Module message

Available on crate feature network only.
Expand description

Implements Ethereum wire protocol for versions 66, 67, and 68. Defines structs/enums for messages, request-response pairs, and broadcasts. Handles compatibility with EthVersion.

Examples include creating, encoding, and decoding protocol messages.

Reference: Ethereum Wire Protocol.

Structs§

ProtocolBroadcastMessage
Represents messages that can be sent to multiple peers.
ProtocolMessage
An eth protocol message, containing a message ID and payload.
RequestPair
This is used for all request-response style eth protocol messages. This can represent either a request or a response, since both include a message payload and request id.

Enums§

EthBroadcastMessage
Represents broadcast messages of EthMessage with the same object that can be sent to multiple peers.
EthMessage
Represents a message in the eth wire protocol, versions 66, 67 and 68.
EthMessageID
Represents message IDs for eth protocol messages.
MessageError
Error when sending/receiving a message

Constants§

MAX_MESSAGE_SIZE
MAX_MESSAGE_SIZE is the maximum cap on the size of a protocol message.