connect
Establish a WebSocket connection to SignalWire RELAY and authenticate. This method
connects to wss://<host>, sends a signalwire.connect authentication request,
subscribes to the configured contexts, and starts the internal receive loop.
For most use cases, prefer run()
which calls connect() internally and adds automatic reconnection. Use connect()
directly only when you need manual control over the event loop or are using the
async context manager.
By default, only one RelayClient connection is allowed per process. Calling
connect() on a second instance without disconnecting the first raises
RuntimeError. Set the RELAY_MAX_CONNECTIONS environment variable to allow
multiple concurrent connections.
Parameters
None.
Returns
None