lib/Room.js
// allow remote clients to trigger events on themselves
allow remote clients to trigger events on themselves
allow remote clients to trigger events on themselves
_emitOnClient(sessionId, event, args) {
        const remoteClient = this.remoteClients[sessionId];
        if (!remoteClient) {
            Debug_1.debugError(`trying to send event ("${event}") to non-existing remote client (${sessionId})`);
            return;
        }
        if (typeof (event) !== 'string') {
            remoteClient.emit('message', new Buffer(event));
        }
        else {
            remoteClient.emit(event, args);
        }
    }
_emitOnClient ( sessionId , event , args ) { const remoteClient = this . remoteClients [ sessionId ] ; if ( ! remoteClient ) { Debug_1 . debugError ( ` ${ event } ${ sessionId } ` ) ; return ; } if ( typeof ( event ) !== 'string' ) { remoteClient . emit ( 'message' , new Buffer ( event ) ) ; } else { remoteClient . emit ( event , args ) ; } }
allow remote clients to trigger events on themselves
allow remote clients to trigger events on themselves