run
Blocking entry point that connects to RELAY and runs the event loop until
interrupted. This is the recommended way to start a RelayClient for long-running
services. It calls connect()
internally and automatically reconnects with exponential backoff (1 second initial
delay, up to 30 seconds maximum) if the connection is lost.
The method blocks the current thread. Press Ctrl+C to trigger a clean shutdown —
the client handles SIGINT gracefully without dumping a stack trace.
run() is synchronous and creates its own asyncio event loop via asyncio.run().
Do not call it from inside an already-running async event loop. For async contexts,
use connect() and
disconnect() directly.
Parameters
None.
Returns
None — blocks until the client is stopped via Ctrl+C or a programmatic shutdown.