Struct distant_core::TransportListener [−][src]
pub struct TransportListener<T, U> where
T: DataStream,
U: Codec, { /* fields omitted */ }
Expand description
Represents a [Stream
] consisting of newly-connected DataStream
instances that
have been wrapped in Transport
Implementations
impl<T, U> TransportListener<T, U> where
T: DataStream + Send + 'static,
U: Codec + Send + 'static,
impl<T, U> TransportListener<T, U> where
T: DataStream + Send + 'static,
U: Codec + Send + 'static,
pub fn initialize<L, F>(listener: L, make_transport: F) -> Self where
L: Listener<Output = T> + 'static,
F: FnMut(T) -> Transport<T, U> + Send + 'static,
Waits for the next fully-initialized transport for an incoming stream to be available, returning none if no longer accepting new connections
Converts into a stream of transport-wrapped connections