pub struct AsyncWasiSocket {
pub state: Box<WasiSocketState>,
/* private fields */
}
Fields§
§state: Box<WasiSocketState>
Implementations§
Source§impl AsyncWasiSocket
impl AsyncWasiSocket
pub fn fd_fdstat_get(&self) -> Result<FdStat, Errno>
Source§impl AsyncWasiSocket
impl AsyncWasiSocket
pub fn from_tcplistener( listener: TcpListener, state: WasiSocketState, ) -> Result<Self>
pub fn from_udpsocket(socket: UdpSocket, state: WasiSocketState) -> Result<Self>
Source§impl AsyncWasiSocket
impl AsyncWasiSocket
pub fn open(state: WasiSocketState) -> Result<Self>
pub fn bind(&mut self, addr: SocketAddr) -> Result<()>
pub fn device(&self) -> Result<Option<Vec<u8>>>
pub fn bind_device(&mut self, interface: Option<&[u8]>) -> Result<()>
pub fn listen(&mut self, backlog: u32) -> Result<()>
pub async fn accept(&mut self) -> Result<Self>
pub async fn connect(&mut self, addr: SocketAddr) -> Result<()>
pub async fn recv<'a>( &self, bufs: &mut [IoSliceMut<'a>], flags: c_int, ) -> Result<(usize, bool)>
pub async fn recv_from<'a>( &self, bufs: &mut [IoSliceMut<'a>], flags: c_int, ) -> Result<(usize, bool, Option<SocketAddr>)>
pub async fn send<'a>( &self, bufs: &[IoSlice<'a>], flags: c_int, ) -> Result<usize>
pub async fn send_to<'a>( &self, bufs: &[IoSlice<'a>], addr: SocketAddr, flags: c_int, ) -> Result<usize>
pub fn shutdown(&mut self, how: Shutdown) -> Result<()>
pub fn get_peer(&mut self) -> Result<SocketAddr>
pub fn get_local(&mut self) -> Result<SocketAddr>
pub fn set_nonblocking(&mut self, nonblocking: bool) -> Result<()>
pub fn get_nonblocking(&self) -> bool
pub fn get_so_type(&self) -> (AddressFamily, SocketType)
pub fn get_so_accept_conn(&self) -> Result<bool>
pub fn sync_conn_state(&mut self)
pub fn set_so_reuseaddr(&mut self, reuseaddr: bool) -> Result<()>
pub fn get_so_reuseaddr(&self) -> bool
pub fn set_so_recv_buf_size(&mut self, buf_size: usize) -> Result<()>
pub fn get_so_recv_buf_size(&self) -> usize
pub fn set_so_send_buf_size(&mut self, buf_size: usize) -> Result<()>
pub fn get_so_send_buf_size(&mut self) -> usize
pub fn set_so_recv_timeout(&mut self, timeout: Option<Duration>) -> Result<()>
pub fn get_so_recv_timeout(&mut self) -> Option<Duration>
pub fn set_so_send_timeout(&mut self, timeout: Option<Duration>) -> Result<()>
pub fn get_so_send_timeout(&mut self) -> Option<Duration>
pub fn get_so_error(&mut self) -> Result<Option<Error>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AsyncWasiSocket
impl !RefUnwindSafe for AsyncWasiSocket
impl Send for AsyncWasiSocket
impl Sync for AsyncWasiSocket
impl Unpin for AsyncWasiSocket
impl !UnwindSafe for AsyncWasiSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more