[−][src]Trait libp2prs_core::transport::TransportListener
Associated Types
type Output: Send
[src]
The result of a connection setup process, including protocol upgrades.
Typically the output contains at least a handle to a data stream (i.e. a connection or a substream multiplexer on top of a connection) that provides APIs for sending and receiving data through the connection.
Required methods
#[must_use]pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
The Listener handles the inbound connections
pub fn multi_addr(&self) -> Option<&Multiaddr>
[src]
Returns the local addresses being listened on.
This might be None
if it is listening on an unspecified address. The actual
addresses will be reported by ListenerEvent::AddressAdded in this case.
Provided methods
pub fn incoming(&mut self) -> Incoming<'_, Self> where
Self: Sized,
[src]
Self: Sized,
#[must_use]pub fn accept_output<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
The Listener handles the inbound connections
Implementors
impl TransportListener for DummyListener
[src]
type Output = DummyStream
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn multi_addr(&self) -> Option<&Multiaddr>
[src]
impl TransportListener for Listener
[src]
type Output = Channel
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn multi_addr(&self) -> Option<&Multiaddr>
[src]
impl<TOutput> TransportListener for ProtectorListener<TOutput> where
TOutput: ConnectionInfo + SplittableReadWrite,
[src]
TOutput: ConnectionInfo + SplittableReadWrite,
type Output = PnetOutput<TOutput>
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn multi_addr(&self) -> Option<&Multiaddr>
[src]
impl<TOutput, TMux, TSec> TransportListener for ListenerUpgrade<TOutput, TMux, TSec> where
TOutput: ConnectionInfo + ReadEx + WriteEx + Unpin + 'static,
TSec: Upgrader<TOutput> + Send + Clone + 'static,
TSec::Output: SecureInfo + ReadEx + WriteEx + Unpin,
TMux: Upgrader<TSec::Output> + 'static,
TMux::Output: StreamMuxerEx + 'static,
[src]
TOutput: ConnectionInfo + ReadEx + WriteEx + Unpin + 'static,
TSec: Upgrader<TOutput> + Send + Clone + 'static,
TSec::Output: SecureInfo + ReadEx + WriteEx + Unpin,
TMux: Upgrader<TSec::Output> + 'static,
TMux::Output: StreamMuxerEx + 'static,
type Output = IStreamMuxer
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn multi_addr(&self) -> Option<&Multiaddr>
[src]
impl<TOutput: Send> TransportListener for TimeoutListener<TOutput>
[src]
type Output = TOutput
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ListenerEvent<Self::Output>, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,