Crate snarkos_node_tcp

source ·
Expand description

Tcp is a simple, low-level, and customizable implementation of a TCP stack.

Modules

  • Objects associated with connection handling.
  • 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

  • The Tcp’s configuration. See the source of Config::default for the defaults.
  • 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.
  • Contains statistics related to Tcp’s peers, currently connected or not.
  • Contains statistics related to Tcp.
  • The central object responsible for handling connections.

Enums

  • Indicates who was the initiator and who was the responder when the connection was established.

Traits

  • A trait for objects containing a Tcp; it is required to implement protocols.

Functions