Crate diem_secure_net

source ·
Expand description

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.

Structs

Enums