Struct bip_dht::DhtBuilder [] [src]

pub struct DhtBuilder { /* fields omitted */ }

Stores information for initializing a DHT.

Methods

impl DhtBuilder
[src]

Creates a DhtBuilder with an initial node for our routing table.

Creates a DhtBuilder with an initial router which will let us gather nodes if our routing table is ever empty.

Difference between a node and a router is that a router is never put in our routing table.

Add nodes which will be distributed within our routing table.

Add a router which will let us gather nodes if our routing table is ever empty.

See DhtBuilder::with_router for difference between a router and a node.

Set the read only flag when communicating with other nodes. Indicates that remote nodes should not add us to their routing table.

Used when we are behind a restrictive NAT and/or we want to decrease incoming network traffic. Defaults value is true.

Provide the DHT with our external address. If this is not supplied we will have to deduce this information from remote nodes.

Purpose of the external address is to generate a NodeId that conforms to BEP 42 so that nodes can safely store information on our node.

Provide the DHT with the source address.

If this is not supplied we will use the OS default route.

Start a mainline DHT with the current configuration.

Trait Implementations

impl Clone for DhtBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DhtBuilder
[src]

Formats the value using the given formatter.