lib/connectors/hybrid/wsprocessor.js
function() {
  EventEmitter.call(this);
  this.httpServer = new HttpServer();

  var self = this;
  this.wsServer = new WebSocketServer({server: this.httpServer});

  this.wsServer.on('connection', function(socket) {
    // emit socket to outside
    self.emit('connection', socket);
  });

  this.state = ST_STARTED;
}
function() {
  EventEmitter.call(this);
  this.httpServer = new HttpServer();

  var self = this;
  this.wsServer = new WebSocketServer({server: this.httpServer});

  this.wsServer.on('connection', function(socket) {
    // emit socket to outside
    self.emit('connection', socket);
  });

  this.state = ST_STARTED;
}
function ( ) { EventEmitter . call ( this ) ; this . httpServer = new HttpServer ( ) ; var self = this ; this . wsServer = new WebSocketServer ( { server : this . httpServer } ) ; this . wsServer . on ( 'connection' , function ( socket ) { // emit socket to outside self . emit ( 'connection' , socket ) ; } ) ; this . state = ST_STARTED ; }
websocket protocol processor
websocket protocol processor