Expand description
This module defines the DiemNet v1 message types, how they are
serialized/deserialized, and provides a Sink
and Stream
implementation
for sending NetworkMessage
s over an abstract IO object (presumably a socket).
The DiemNet specification describes in greater detail how these messages are sent and received over-the-wire.
Structs
- A
Sink
of outboundNetworkMessage
s that will be serialized and sent over an underlying socket. - A
Stream
of inboundNetworkMessage
s read and deserialized from an underlying socket. - Flags an invalid network message with as much header information as possible. This is a message that this peer cannot even parse its header information.
Enums
- Most primitive message type set on the network.
- Flags an unsupported network message. This is a message that a peer can parse its header information but does not have a handler.
- Errors from reading and deserializing network messages off the wire.
- Errors from serializing and sending network messages on the wire.
Functions
- Returns a fully configured length-delimited codec for writing/reading serialized
NetworkMessage
frames to/from a socket.
Type Definitions
- Create alias Priority for u8.
- Create alias RequestId for u32.