19 releases (4 breaking)
0.5.4 | Aug 11, 2024 |
---|---|
0.5.3 | Aug 7, 2024 |
0.4.6 | Aug 5, 2024 |
0.3.1 | Aug 3, 2024 |
0.1.5 | Jul 30, 2024 |
#1507 in Web programming
651 downloads per month
39KB
581 lines
protosocket
Tools for building message-oriented tcp streams.
A protosocket is a non-blocking, bidirectional, message streaming connection. Providing a serializer and deserializer for your messages, you can stream to and from tcp servers.
Protosockets avoid too many opinions - you have (get?) to choose your own message ordering and concurrency semantics. You can make an implicitly ordered stream, or a non-blocking out-of-order stream, or anything in between.
Tools to facilitate protocol buffers over tcp are provided in protosocket-prost
.
You can see the protocol buffers example in example-proto
.
If you're only using rust, of course you can hand-write prost structs, but if you
want to use a protosocket server with clients in other languages you'll want to
generate from protos.
lib.rs
:
Conveniences for writing protosocket servers.
See example-telnet for the simplest full example of the entire workings, or example-proto for an example of how to use this crate with protocol buffers.
Dependencies
~4–12MB
~132K SLoC