[−][src]Trait tari_comms::transports::Transport
Associated Types
type Output
The output of the transport after a connection is established
type Error: Error + Send + Sync
Transport error type
type Inbound: Future<Output = Result<Self::Output, Self::Error>> + Send
A future which resolves to Self::Output
type Listener: Stream<Item = Result<(Self::Inbound, Multiaddr), Self::Error>> + Send + Unpin
A stream which emits Self::InboundFuture
whenever a successful inbound connection is made
type ListenFuture: Future<Output = Result<(Self::Listener, Multiaddr), Self::Error>> + Send + Unpin
The future returned from the listen
method.
type DialFuture: Future<Output = Result<Self::Output, Self::Error>> + Send + Unpin
The future returned from the dial
method.
Required methods
fn listen(&self, addr: Multiaddr) -> Result<Self::ListenFuture, Self::Error>
Listen for connections on the given multiaddr
fn dial(&self, addr: Multiaddr) -> Result<Self::DialFuture, Self::Error>
Connect (dial) to the given multiaddr