Constant darkfi::net::hosts::LOCAL_HOST_STRS

source ·
pub const LOCAL_HOST_STRS: [&str; 2];
Expand description

The main interface for interacting with the hostlist. Contains the following:

Hosts: the main parent class that manages HostRegistry and HostContainer. It is also responsible for filtering addresses before writing to the hostlist.

HostRegistry: A locked HashMap that maps peer addresses onto mutually exclusive states (HostState). Prevents race conditions by dictating a strict flow of logically acceptable states.

HostContainer: A wrapper for the hostlists. Each hostlist is represented by a HostColor, which can be Grey, White, Gold or Black. Exposes a common interface for hostlist queries and utilities.

HostColor: White hosts have been seen recently. Gold hosts we have been able to establish a connection to. Grey hosts are recently received hosts that are periodically refreshed using the greylist refinery. Black hosts are considered hostile and are strictly avoided for the duration of the program. Dark hosts are hosts that do not match our transports, but that we continue to share with other peers. They are otherwise ignored.

HostState: a set of mutually exclusive states that can be Insert, Refine, Connect, Suspend or Connected. The state is None when the corresponding host has been removed from the HostRegistry.