Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethereumdegen/degen-websockets
A websocket server for rust
https://github.com/ethereumdegen/degen-websockets
Last synced: 21 days ago
JSON representation
A websocket server for rust
- Host: GitHub
- URL: https://github.com/ethereumdegen/degen-websockets
- Owner: ethereumdegen
- Created: 2023-07-24T00:12:56.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-25T06:41:31.000Z (over 1 year ago)
- Last Synced: 2024-04-14T15:24:22.014Z (7 months ago)
- Language: Rust
- Size: 95.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Degen Websockets
A websocket server and client framework supporting:
* Reliable messaging (option)
* Broadcast-to-all, Specific-destination or Room-based destinations for messages### Install
cargo add degen-websockets
### Examples
See main.rs
### Custom messages
You can define your own inner messages to send through the socket server. They just need to implement Serialize/Deserialize and MessageReliability as follows:```
#[derive(Serialize,Deserialize)]
struct MyCustomMessage {
color: String
}impl MessageReliability for MyCustomMessage {
fn get_reliability_type(&self, msg_uuid:String) -> MessageReliabilityType{
return MessageReliabilityType::Reliable( msg_uuid )
}
}
```