Expand description
Tcp is a simple, low-level, and customizable implementation of a TCP stack.
Modules§
- connections
- Objects associated with connection handling.
- protocols
- Opt-in protocols available to the node; each protocol is expected to spawn its own task that runs throughout the node’s lifetime and handles a specific functionality. The communication with these tasks is done via dedicated handler objects.
Structs§
- Banned
Peers - Contains the set of peers currently banned by IP.
- Config
- The Tcp’s configuration. See the source of
Config::default
for the defaults. - Connection
- Created for each active connection; used by the protocols to obtain a handle for reading and writing, and keeps track of tasks that have been spawned for the connection.
- Known
Peers - Contains statistics related to Tcp’s peers, currently connected or not.
- Stats
- Contains statistics related to Tcp.
- Tcp
- The central object responsible for handling connections.
Enums§
- Connection
Side - Indicates who was the initiator and who was the responder when the connection was established.
Traits§
Functions§
- create_
span - Creates the Tcp’s tracing span based on its name.
- is_
bogon_ ip - Checks if the given IP address is a bogon address.
- is_
unspecified_ or_ broadcast_ ip - Checks if the given IP address is unspecified or broadcast.