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
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
impl Socket for LocalDgramSocket
impl Socket for LocalStreamSocket
impl Socket for LocalStreamListener
impl Socket for LocalSeqPacketSocket
impl Socket for LocalSeqPacketListener
impl Socket for TcpSocket
impl Socket for TcpListener
impl Socket for UdpSocket
impl Socket for IcmpSocket