Drains all messages pending from all clients and returns them as a list[bytes]. Note that clients are not distinguished, so clients will have to self-identify in their messages, or the library will need to change to return messages per-client or bundled with client connection info.
Requests that the websocket server shut down. The server will not shut down immediately but will stop serving as soon as e.g. it processes the shutdown request and any existing network requests are resolved.
Send messages to all connected clients. The socket stream is flushed after buffering each message in the argument List, so it’s better to call this once per ‘update,’ rather than calling this method multiple times if multiple messages are all available to be sent.