Struct libp2p_tcp::TcpConfig

source ·
pub struct TcpConfig { /* private fields */ }
Expand description

Represents the configuration for a TCP/IP transport capability for libp2p.

The TCP sockets created by libp2p will need to be progressed by running the futures and streams obtained by libp2p through the tokio reactor.

Implementations

Creates a new configuration object for TCP/IP.

Sets the size of the recv buffer size to set for opened sockets.

Sets the size of the send buffer size to set for opened sockets.

Sets the TTL to set for opened sockets.

Sets the keep alive pinging duration to set for opened sockets.

Sets the TCP_NODELAY to set for opened sockets.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The raw connection to a peer.
Error that can happen when dialing or listening.
The listener produces incoming connections. Read more
After a connection has been received, we may need to do some asynchronous pre-processing on it (e.g. an intermediary protocol negotiation). While this pre-processing takes place, we want to be able to continue polling on the listener. Read more
A future which indicates that we are currently dialing to a peer.
Listen on the given multiaddr. Returns a stream of incoming connections, plus a modified version of the Multiaddr. This new Multiaddr is the one that that should be advertised to other nodes, instead of the one passed as parameter. Read more
Dial the given multi-addr. Read more
Takes a multiaddress we’re listening on (server), and tries to convert it to an externally-visible multiaddress. In order to do so, we pass an observed address which a remote node observes for one of our dialers. Read more
Applies a function on the output of the Transport.
Applies a function on the errors generated by the futures of the Transport.
Builds a new struct that implements Transport that contains both self and other. Read more
Wraps this transport inside an upgrade. Whenever a connection that uses this transport is established, it is wrapped inside the upgrade. Read more
Adds a timeout to the connection and upgrade steps for all the sockets created by the transport. Read more
Adds a timeout to the connection and upgrade steps for all the outgoing sockets created by the transport. Read more
Adds a timeout to the connection and upgrade steps for all the incoming sockets created by the transport. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.