Trait asio::Socket [] [src]

pub trait Socket: Sized + AsRawFd {
    type Protocol: Protocol;
    type Endpoint: Endpoint<Self::Protocol>;
    fn bind(&self, ep: &Self::Endpoint) -> Result<()>;
    fn local_endpoint(&self) -> Result<Self::Endpoint>;

    fn io_control<T: IoControl<Self>>(&self, cmd: &mut T) -> Result<()> { ... }
    fn get_option<T: GetSocketOption<Self>>(&self) -> Result<T> { ... }
    fn set_option<T: SetSocketOption<Self>>(&self, cmd: &T) -> Result<()> { ... }
}

Associated Types

type Protocol: Protocol

type Endpoint: Endpoint<Self::Protocol>

Required Methods

fn bind(&self, ep: &Self::Endpoint) -> Result<()>

fn local_endpoint(&self) -> Result<Self::Endpoint>

Provided Methods

fn io_control<T: IoControl<Self>>(&self, cmd: &mut T) -> Result<()>

fn get_option<T: GetSocketOption<Self>>(&self) -> Result<T>

fn set_option<T: SetSocketOption<Self>>(&self, cmd: &T) -> Result<()>

Implementors