pub trait IncomingChannelFactory: Send + Sync {
type Stream: Send + Sync + 'static;
// Required method
fn accept_from_transport<'life0, 'async_trait>(
&'life0 self,
peer: Sensitive<SocketAddr>,
stream: Self::Stream,
memquota: ChannelAccount,
) -> Pin<Box<dyn Future<Output = Result<Arc<Channel>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Similar to ChannelFactory, but for building channels from incoming streams.
Required Associated Types§
Required Methods§
Sourcefn accept_from_transport<'life0, 'async_trait>(
&'life0 self,
peer: Sensitive<SocketAddr>,
stream: Self::Stream,
memquota: ChannelAccount,
) -> Pin<Box<dyn Future<Output = Result<Arc<Channel>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept_from_transport<'life0, 'async_trait>(
&'life0 self,
peer: Sensitive<SocketAddr>,
stream: Self::Stream,
memquota: ChannelAccount,
) -> Pin<Box<dyn Future<Output = Result<Arc<Channel>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open a channel from peer with the given stream. The channel may or may not be
authenticated.