lib/transports/websocket.js
/**
 * HTTP interface constructor. Interface compatible with all transports that
 * depend on request-response cycles.
 *
 * @api public
 */
HTTP interface constructor. Interface compatible with all transports that
depend on request-response cycles.

@api public
HTTP interface constructor . Interface compatible with all transports that depend on request - response cycles . @api public
function WebSocket (mng, data, wsSocket) {
  Transport.call(this, mng, data, wsSocket);
  this.socket = wsSocket;
  this.socket.on('message', this._onMessage.bind(this));
  this.socket.once('close', this._onClose.bind(this));
  this.socket.on('error', this._onError.bind(this));
  this.onConnect();
}
function WebSocket ( mng , data , wsSocket ) { Transport . call ( this , mng , data , wsSocket ) ; this . socket = wsSocket ; this . socket . on ( 'message' , this . _onMessage . bind ( this ) ) ; this . socket . once ( 'close' , this . _onClose . bind ( this ) ) ; this . socket . on ( 'error' , this . _onError . bind ( this ) ) ; this . onConnect ( ) ; }
HTTP interface constructor.
HTTP interface constructor .