pub trait SocketConnectionExt: 'static {
    // Required methods
    fn connect(
        &self,
        address: &impl IsA<SocketAddress>,
        cancellable: Option<&impl IsA<Cancellable>>
    ) -> Result<(), Error>;
    fn connect_async<P: FnOnce(Result<(), Error>) + 'static>(
        &self,
        address: &impl IsA<SocketAddress>,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P
    );
    fn connect_future(
        &self,
        address: &impl IsA<SocketAddress> + Clone + 'static
    ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
    fn local_address(&self) -> Result<SocketAddress, Error>;
    fn remote_address(&self) -> Result<SocketAddress, Error>;
    fn socket(&self) -> Socket;
    fn is_connected(&self) -> bool;
}

Required Methods§

source

fn connect( &self, address: &impl IsA<SocketAddress>, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>

source

fn connect_async<P: FnOnce(Result<(), Error>) + 'static>( &self, address: &impl IsA<SocketAddress>, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

source

fn connect_future( &self, address: &impl IsA<SocketAddress> + Clone + 'static ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn local_address(&self) -> Result<SocketAddress, Error>

source

fn remote_address(&self) -> Result<SocketAddress, Error>

source

fn socket(&self) -> Socket

source

fn is_connected(&self) -> bool

Implementors§