| Crates.io | basws-server |
| lib.rs | basws-server |
| version | 0.1.4 |
| created_at | 2020-09-15 22:08:11.666983+00 |
| updated_at | 2021-02-08 18:33:47.682477+00 |
| description | A simple async WebSocket client/server framework |
| homepage | |
| repository | https://github.com/khonsulabs/basws |
| max_upload_size | |
| id | 289245 |
| size | 45,183 |
basws-server is a simple WebSocket framework. For more information, see the basws README.
To set up your own protocol server:
ServerLogic traitServer passing in your ServerLogic implementorserver.incoming_connection with the websocket during on_upgrade. Make sure to move into closures and clone() as needed. The Server is a reference-counted type, so cloning is cheap.server.send_to_installation_id, server.send_to_account_id, and server.broadcast to communicate out-of-band with clients.For a full example, check out the chat-server example.