constructor(conf: ChatWorkerConf) { this._debug = debugFactory('ChatUp:ChatWorker:slave:' + process.pid); this._debug('Slave init'); this._conf = conf; if (conf.ssl && conf.ssl.key && conf.ssl.cert) { this._app = https.createServer(conf.ssl); } else { this._app = http.createServer(); } this._io = socketio(this._app, { serverClient: false }); this._store = new Store(this._conf); this._io.on('connection', this._onConnection); this._sockets = []; this._initStatsReporting(); }