Skip to main content

Module codec

Module codec 

Source
Expand description

A Tokio codec that transforms an AsyncRead into a Stream of Messages. A Tokio codec mapping byte streams to Bitcoin message streams.

Structsยง

Builder
A builder for specifying Codec options.
Codec
A codec which produces Bitcoin messages from byte streams and vice versa.

Enumsยง

DecodeState ๐Ÿ”’
Decoded ๐Ÿ”’
The result of decoding the next message in a buffer.

Constantsยง

HEADER_LEN ๐Ÿ”’
The length of a Bitcoin message header.
INITIAL_BODY_RESERVATION_STEP ๐Ÿ”’
Initial cap on reserved body capacity, before any body bytes have arrived.
MAX_HANDSHAKE_BODY_LEN ๐Ÿ”’
The maximum body length allowed before the handshake completes.
MAX_IGNORED_MESSAGES_PER_DECODE ๐Ÿ”’
The number of messages in a row that one [Decoder::decode] call ignores.