Event is emitted when E2E connection is setup correctly. The event will pass the connection to the listener.
Event is emitted when the state of the connector changes. The listener callback will be called in order to have access from outside to the errors that occur on the web socket level.
Retrieve the online state based on connections to comm servers.
If we don't have connections to comm servers, the state will always be true.
Listen for connections using a communication server.
The communication server to use. (URL is passed to WebSocket)
Optional
listenerIdPrefix: stringThe prefix to add before the listener id
Listen for direct connections.
This function will start a listening websocket server only the first time this function is called with the same host / port / localPublicKey options. All following calls will just increase a reference counter, but not start a listening
Optional
listenerIdPrefix: stringThe prefix to add before the listener id
Shutdown the listeners.
This does not shutdown the already established encrypted connections, it just shuts down the listeners.
Static
communicationStatic
directOptional
listenerIdPrefix: string
This class manages and authenticates incoming connections.
This class also ensures, that there aren't multiple listeners listening on the same socket, which would lead to errors.