darkfi::net

Module hosts

Source
Expand description

Hosts are a list of network addresses used when establishing outbound connections.

Hosts are shared across the network through the address protocol. When attempting to connect, a node will loop through addresses in the hosts store until it finds ones to connect to.

Structsยง

  • A Container for managing Grey, White, Gold and Black hostlists. Exposes a common interface for writing to and querying hostlists.
  • Main parent class for the management and manipulation of hostlists.

Enumsยง

  • HostState ๐Ÿ”’
    HostState is a set of mutually exclusive states that can be Insert, Refine, Move, Connect, Suspend or Connected or Free.

Constantsยง

Type Aliasesยง

  • HostRegistry ๐Ÿ”’
    Keeps track of hosts and their current state. Prevents race conditions where multiple threads are simultaneously trying to change the state of a given host.
  • Atomic pointer to hosts object