registerRelayWebSocket static method

WebSocket registerRelayWebSocket({
  1. required String relayUrl,
  2. required WebSocket webSocket,
})

Registers a WebSocket to the registry with the given relayUrl. If a WebSocket is already registered with the given relayUrl, it will be replaced.

Implementation

static WebSocket registerRelayWebSocket({
  required String relayUrl,
  required WebSocket webSocket,
}) {
  relaysWebSocketsRegistry[relayUrl] = webSocket;
  return relaysWebSocketsRegistry[relayUrl]!;
}