| 0.1.4 |
|
|---|---|
| 0.1.3 |
|
| 0.1.1 |
|
| 0.1.0-dev-8 |
|
| 0.1.0-dev-6 |
|
#24 in #server-framework
40 downloads per month
Used in basws
54KB
1.5K
SLoC
basws-server
basws-server is a simple WebSocket framework. For more information, see the basws README.
To set up your own protocol server:
- Implement the
ServerLogictrait - Create a
Serverpassing in yourServerLogicimplementor - In your warp filters, call
server.incoming_connectionwith the websocket during on_upgrade. Make sure tomoveinto closures andclone()as needed. The Server is a reference-counted type, so cloning is cheap. - You can use
server.send_to_installation_id,server.send_to_account_id, andserver.broadcastto communicate out-of-band with clients.
For a full example, check out the chat-server example.
Dependencies
~17–31MB
~362K SLoC