pub trait SocketExt {
    fn protocol(&self) -> Protocol;
    fn local_endpoint(&self) -> SocketEndpoint;
    fn remote_endpoint(&self) -> SocketEndpoint;
    fn is_closed(&self) -> bool;
    fn close(&mut self);
    fn can_recv(&self) -> bool;
    fn recv(&mut self) -> Result<Option<(IpEndpoint, Vec<u8>)>, Error>;
    fn can_send(&self) -> bool;
    fn send_capacity(&self) -> usize;
    fn send_queue(&self) -> usize;
    fn state<T: Default>(&self) -> SocketState<T>;
    fn desc(&self) -> SocketDesc;
}
Expand description

Common interface for various socket types

Required Methods§

Implementations on Foreign Types§

Implementors§