function(app, opts) {
  opts = opts || {};
  this.app = app;
  this.connector = getConnector(app, opts);
  this.encode = opts.encode;
  this.decode = opts.decode;
  this.useCrypto = opts.useCrypto;
  this.useHostFilter = opts.useHostFilter;
  this.useAsyncCoder = opts.useAsyncCoder;
  this.blacklistFun = opts.blacklistFun;
  this.keys = {};
  this.blacklist = [];

  if (opts.useDict) {
    app.load(pomelo.dictionary, app.get('dictionaryConfig'));
  }

  if (opts.useProtobuf) {
    app.load(pomelo.protobuf, app.get('protobufConfig'));
  }

  // component dependencies
  this.server = null;
  this.session = null;
  this.connection = null;
}
function(app, opts) {
  opts = opts || {};
  this.app = app;
  this.connector = getConnector(app, opts);
  this.encode = opts.encode;
  this.decode = opts.decode;
  this.useCrypto = opts.useCrypto;
  this.useHostFilter = opts.useHostFilter;
  this.useAsyncCoder = opts.useAsyncCoder;
  this.blacklistFun = opts.blacklistFun;
  this.keys = {};
  this.blacklist = [];

  if (opts.useDict) {
    app.load(pomelo.dictionary, app.get('dictionaryConfig'));
  }

  if (opts.useProtobuf) {
    app.load(pomelo.protobuf, app.get('protobufConfig'));
  }

  // component dependencies
  this.server = null;
  this.session = null;
  this.connection = null;
}
function ( app , opts ) { opts = opts || { } ; this . app = app ; this . connector = getConnector ( app , opts ) ; this . encode = opts . encode ; this . decode = opts . decode ; this . useCrypto = opts . useCrypto ; this . useHostFilter = opts . useHostFilter ; this . useAsyncCoder = opts . useAsyncCoder ; this . blacklistFun = opts . blacklistFun ; this . keys = { } ; this . blacklist = [ ] ; if ( opts . useDict ) { app . load ( pomelo . dictionary , app . get ( 'dictionaryConfig' ) ) ; } if ( opts . useProtobuf ) { app . load ( pomelo . protobuf , app . get ( 'protobufConfig' ) ) ; } // component dependencies this . server = null ; this . session = null ; this . connection = null ; }
Connector component. Receive client requests and attach session with socket.

@param {Object} app  current application context
@param {Object} opts attach parameters
opts.connector {Object} provides low level network and protocol details implementation between server and clients.
Connector component . Receive client requests and attach session with socket .
Initialize a new Knockout object.