export class RpcSocketPool { private rpcSockets : { [ id ] : I_RpcSocket ; } = { } ; /**
     * Add socket
     */ addSocket ( id , socket ) { this . rpcSockets [ id ] = socket ; } /**
     * Remove socket
     */ removeSocket ( id ) { delete this . rpcSockets [ id ] ; } /**
     * send messages
     */ sendMsg ( id , msg ) { let socket = this . rpcSockets [ id ] ; if ( socket ) { socket . send ( msg ) ; } } /**
     * Get socket
     */ getSocket ( id ) { return this . rpcSockets [ id ] ; } } export interface I_RpcSocket { send ( data ) : void ; }