Trait linux_object::net::Socket
source · [−]pub trait Socket: Send + Sync + Debug {
Show 14 methods
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = (SysResult, Endpoint)> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn write(&self, data: &[u8], sendto_endpoint: Option<Endpoint>) -> SysResult;
fn connect<'life0, 'async_trait>(
&'life0 self,
endpoint: Endpoint
) -> Pin<Box<dyn Future<Output = SysResult> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn poll(&self, _events: PollEvents) -> (bool, bool, bool) { ... }
fn bind(&self, _endpoint: Endpoint) -> SysResult { ... }
fn listen(&self) -> SysResult { ... }
fn shutdown(&self) -> SysResult { ... }
fn accept<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LxResult<(Arc<dyn FileLike>, Endpoint)>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn endpoint(&self) -> Option<Endpoint> { ... }
fn remote_endpoint(&self) -> Option<Endpoint> { ... }
fn setsockopt(&self, _level: usize, _opt: usize, _data: &[u8]) -> SysResult { ... }
fn ioctl(
&self,
_request: usize,
_arg1: usize,
_arg2: usize,
_arg3: usize
) -> SysResult { ... }
fn get_buffer_capacity(&self) -> Option<(usize, usize)> { ... }
fn socket_type(&self) -> Option<SocketType> { ... }
}
Expand description
Common methods that a socket must have
Required Methods
missing documentation
missing documentation
Provided Methods
wait for some event (in, out, err) on a fd
missing documentation
fn remote_endpoint(&self) -> Option<Endpoint>
fn remote_endpoint(&self) -> Option<Endpoint>
missing documentation
missing documentation
missing documentation
fn get_buffer_capacity(&self) -> Option<(usize, usize)>
fn get_buffer_capacity(&self) -> Option<(usize, usize)>
Get Socket recv and send buffer capacity
fn socket_type(&self) -> Option<SocketType>
fn socket_type(&self) -> Option<SocketType>
Get Socket Type
Implementors
impl Socket for NetlinkSocketState
impl Socket for RawSocketState
missing in implementation
impl Socket for TcpSocketState
impl Socket for UdpSocketState
missing in implementation