Trait mfio_rt::Tcp

source ·
pub trait Tcp: IoBackend {
    type StreamHandle: TcpStreamHandle;
    type ListenerHandle: TcpListenerHandle<StreamHandle = Self::StreamHandle>;
    type ConnectFuture<'a, A: ToSocketAddrs + Send + 'a>: Future<Output = MfioResult<Self::StreamHandle>> + 'a
       where Self: 'a;
    type BindFuture<'a, A: ToSocketAddrs + Send + 'a>: Future<Output = MfioResult<Self::ListenerHandle>> + 'a
       where Self: 'a;

    // Required methods
    fn connect<'a, A: ToSocketAddrs + Send + 'a>(
        &'a self,
        addrs: A
    ) -> Self::ConnectFuture<'a, A>;
    fn bind<'a, A: ToSocketAddrs + Send + 'a>(
        &'a self,
        addrs: A
    ) -> Self::BindFuture<'a, A>;
}
Available on crate feature std only.
Expand description

Describes TCP capable runtime operations.

Required Associated Types§

source

type StreamHandle: TcpStreamHandle

source

type ListenerHandle: TcpListenerHandle<StreamHandle = Self::StreamHandle>

source

type ConnectFuture<'a, A: ToSocketAddrs + Send + 'a>: Future<Output = MfioResult<Self::StreamHandle>> + 'a where Self: 'a

source

type BindFuture<'a, A: ToSocketAddrs + Send + 'a>: Future<Output = MfioResult<Self::ListenerHandle>> + 'a where Self: 'a

Required Methods§

source

fn connect<'a, A: ToSocketAddrs + Send + 'a>( &'a self, addrs: A ) -> Self::ConnectFuture<'a, A>

source

fn bind<'a, A: ToSocketAddrs + Send + 'a>( &'a self, addrs: A ) -> Self::BindFuture<'a, A>

Object Safety§

This trait is not object safe.

Implementors§