0.2.7 Aug 16, 2022
0.2.6 Aug 13, 2022
0.2.2 Jul 22, 2022
0.1.7 Jul 9, 2022
0.1.0 May 27, 2022

#59 in #aptos

Download history 18/week @ 2024-04-01 6/week @ 2024-06-17 98/week @ 2024-07-08

99 downloads per month
Used in 62 crates (6 directly)

Apache-2.0

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

~10–22MB
~342K SLoC