0.2.7 |
|
---|---|
0.2.6 |
|
0.2.2 |
|
0.1.7 |
|
0.1.0 |
|
#69 in #event
42 downloads per month
Used in 62 crates
(6 directly)
115KB
2.5K
SLoC
This provides a simple networking substrate between a client and server. It is assumed that all operations are blocking and return only complete blocks of data. The intended use case has the server blocking on read. Upon receiving a payload during a read, the server should process the payload, write a response, and then block on read again. The client should block on read after performing a write. Upon errors or remote disconnections, the call (read, write) will return an error to let the caller know of the event. A follow up call will result in the service attempting to either reconnect in the case of a client or accept a new client in the case of a server.
Internally both the client and server leverage a NetworkStream that communications in blocks where a block is a length prefixed array of bytes.
Dependencies
~11–23MB
~349K SLoC