Struct bip_handshake::HandshakerBuilder
[−]
[src]
pub struct HandshakerBuilder { /* fields omitted */ }
Build configuration for Handshaker
object creation.
Methods
impl HandshakerBuilder
[src]
fn new() -> HandshakerBuilder
[src]
Create a new HandshakerBuilder
.
fn with_bind_addr(&mut self, addr: SocketAddr) -> &mut HandshakerBuilder
[src]
Address that the host will listen on.
Defaults to IN_ADDR_ANY using port 0 (any free port).
fn with_open_port(&mut self, port: u16) -> &mut HandshakerBuilder
[src]
Port that external peers should connect on.
Defaults to the port that is being listened on (will only work if the host is not natted).
fn with_peer_id(&mut self, peer_id: PeerId) -> &mut HandshakerBuilder
[src]
Peer id that will be advertised when handshaking with other peers.
Defaults to a random SHA-1 hash; official clients should use an encoding scheme.
fn with_extensions(&mut self, ext: Extensions) -> &mut HandshakerBuilder
[src]
Extensions supported by our client, advertised to the peer when handshaking.
fn with_config(&mut self, config: HandshakerConfig) -> &mut HandshakerBuilder
[src]
Configuration that will be used to alter the internal behavior of handshaking.
This will typically not need to be set unless you know what you are doing.
fn build<T>(
&self,
transport: T,
handle: Handle
) -> Result<Handshaker<T::Socket>> where
T: Transport + 'static,
[src]
&self,
transport: T,
handle: Handle
) -> Result<Handshaker<T::Socket>> where
T: Transport + 'static,
Build a Handshaker
over the given Transport
with a Remote
instance.
Trait Implementations
impl Copy for HandshakerBuilder
[src]
impl Clone for HandshakerBuilder
[src]
fn clone(&self) -> HandshakerBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more