pub async fn start_server(port: u16) -> Result<EventStream, Error>
Expand description
A ready to use websockets server
This method is used to spawn a websockets server with just several lines of code. It accepts a port where the server will run, and returns an EventStream, which is a stream that notifies all the relevant events of the websockets server, like new connected clients messages from a single client, disconnections and errors.