Struct ethcore_network::NetworkConfiguration [] [src]

pub struct NetworkConfiguration {
    pub config_path: Option<String>,
    pub net_config_path: Option<String>,
    pub listen_address: Option<SocketAddr>,
    pub public_address: Option<SocketAddr>,
    pub udp_port: Option<u16>,
    pub nat_enabled: bool,
    pub discovery_enabled: bool,
    pub boot_nodes: Vec<String>,
    pub use_secret: Option<Secret>,
    pub min_peers: u32,
    pub max_peers: u32,
    pub max_handshakes: u32,
    pub reserved_protocols: HashMap<ProtocolId, u32>,
    pub reserved_nodes: Vec<String>,
    pub non_reserved_mode: NonReservedPeerMode,
    pub allow_ips: AllowIP,
}

Network service configuration

Fields

Directory path to store general network configuration. None means nothing will be saved

Directory path to store network-specific configuration. None means nothing will be saved

IP address to listen for incoming connections. Listen to all connections by default

IP address to advertise. Detected automatically if none.

Port for UDP connections, same as TCP by default

Enable NAT configuration

Enable discovery

List of initial node addresses

Use provided node key instead of default

Minimum number of connected peers to maintain

Maximum allowed number of peers

Maximum handshakes

Reserved protocols. Peers with protocol get additional connection slots.

List of reserved node addresses.

The non-reserved peer mode.

IP filter

Methods

impl NetworkConfiguration
[src]

Create a new instance of default settings.

Create new default configuration with sepcified listen port.

Create new default configuration for localhost-only connection with random port (usefull for testing)

Trait Implementations

impl Debug for NetworkConfiguration
[src]

Formats the value using the given formatter.

impl PartialEq for NetworkConfiguration
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for NetworkConfiguration
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for NetworkConfiguration
[src]

Returns the "default value" for a type. Read more