lib/SocketManager.js
/**
   * Handles new socket connections
   *
   * @param {Socket} socket
   */
Handles new socket connections
@param {Socket} socket
Handles new socket connections @param { Socket } socket
_onConnection (socket) {
    logger.debug(`New connection ${socket.id}`)
    for (const k in inboundEvents) {
      const eventName = inboundEvents[k]
      socket.on(eventName, this._emitEvent.bind(this, eventName, socket))
    }
    socket.on('disconnect', function () {
      logger.debug(`User disconnected ${socket.id}`)
    })
  }
_onConnection ( socket ) { logger . debug ( ` ${ socket . id } ` ) for ( const k in inboundEvents ) { const eventName = inboundEvents [ k ] socket . on ( eventName , this . _emitEvent . bind ( this , eventName , socket ) ) } socket . on ( 'disconnect' , function ( ) { logger . debug ( ` ${ socket . id } ` ) } ) }
Handles new socket connections
 @param {Socket} socket
Handles new socket connections @param { Socket } socket
// register inbound events from this socket // pass socket reference as first parameter