code: function WebsocketConnection(socket, url) {
    this.socket = socket;
    this.url = url;
  
    this.deferreds = {};
    this.nextRequestId = 0;
  
    this.onReply = this.onReply.bind(this);
    this.onEvent = this.onEvent.bind(this);
  }
docs: Handle a 'session' in which we make a number of calls