Trait distant_net::TcpServerExt
source · [−]pub trait TcpServerExt {
type Request;
type Response;
fn start<'async_trait, P, C>(
self,
addr: IpAddr,
port: P,
codec: C
) -> Pin<Box<dyn Future<Output = Result<TcpServerRef>> + Send + 'async_trait>>
where
P: Into<PortRange> + Send,
C: Codec + Send + Sync + 'static,
P: 'async_trait,
C: 'async_trait,
Self: 'async_trait;
}
Expand description
Extension trait to provide a reference implementation of starting a TCP server
that will listen for new connections and process them using the Server
implementation
Required Associated Types
Required Methods
Start a new server using the provided listener