Crates.io | netty-rs |
lib.rs | netty-rs |
version | 0.1.0 |
source | src |
created_at | 2021-04-18 09:38:37.916491 |
updated_at | 2021-04-18 09:38:37.916491 |
description | Netty-rs allows exposes a simple-to-use API used to create stateful application level network protocols as both a client or server. |
homepage | |
repository | https://gitlab.com/Gelox/netty-rs |
max_upload_size | |
id | 386067 |
size | 45,250 |
Netty-rs allows exposes a simple-to-use API used to create stateful application level network protocols as both a client or server.
When implementing p2p applications I found myself implementing the same TCP constructs over and over again in order to be able to implement a custom message passing protocol that allowed for multiplexing different peers and replying to messages. This crate is an attempt to generalize the solution to this problem.
Netty-rs allows requires consumers specify how to handle messages in different
circumstances. Whenever specifying this the same API is used by using Connection
.
This very simple API allows consumers to specify restful protocols of varying complexity.
Each message-and-reply chain is in their own channel which does not and is not impacted by
messages sent or received in other message-and-reply chains.
The situations where how to handle messages need to be specified are:
The main API is accessed through the Networker struct.
Netty-rs uses the DirectoryService
trait in order to allow consumers to either implement
their own directory service for example a DNS or use the SimpleDirectoryService
struct that
implements this trait.
See the docs for further documentation and an example.