Struct wasmer_wasix::net::socket::InodeSocket
source · pub struct InodeSocket { /* private fields */ }
Implementations§
source§impl InodeSocket
impl InodeSocket
pub fn new(kind: InodeSocketKind) -> Self
pub async fn bind( &self, tasks: &dyn VirtualTaskManager, net: &dyn VirtualNetworking, set_addr: SocketAddr ) -> Result<Option<InodeSocket>, Errno>
pub async fn listen( &self, tasks: &dyn VirtualTaskManager, net: &dyn VirtualNetworking, _backlog: usize ) -> Result<Option<InodeSocket>, Errno>
pub async fn accept( &self, tasks: &dyn VirtualTaskManager, fd_flags: Fdflags ) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr), Errno>
pub fn close(&self) -> Result<(), Errno>
pub async fn flush(&self, tasks: &dyn VirtualTaskManager) -> Result<(), Errno>
pub async fn connect( &mut self, tasks: &dyn VirtualTaskManager, net: &dyn VirtualNetworking, peer: SocketAddr, timeout: Option<Duration> ) -> Result<Option<InodeSocket>, Errno>
pub fn status(&self) -> Result<WasiSocketStatus, Errno>
pub fn addr_local(&self) -> Result<SocketAddr, Errno>
pub fn addr_peer(&self) -> Result<SocketAddr, Errno>
pub fn set_opt_flag( &mut self, option: WasiSocketOption, val: bool ) -> Result<(), Errno>
pub fn get_opt_flag(&self, option: WasiSocketOption) -> Result<bool, Errno>
pub fn set_send_buf_size(&mut self, size: usize) -> Result<(), Errno>
pub fn send_buf_size(&self) -> Result<usize, Errno>
pub fn set_recv_buf_size(&mut self, size: usize) -> Result<(), Errno>
pub fn recv_buf_size(&self) -> Result<usize, Errno>
pub fn set_linger(&mut self, linger: Option<Duration>) -> Result<(), Errno>
pub fn linger(&self) -> Result<Option<Duration>, Errno>
pub fn set_opt_time( &self, ty: TimeType, timeout: Option<Duration> ) -> Result<(), Errno>
pub fn opt_time(&self, ty: TimeType) -> Result<Option<Duration>, Errno>
pub fn set_ttl(&self, ttl: u32) -> Result<(), Errno>
pub fn ttl(&self) -> Result<u32, Errno>
pub fn set_multicast_ttl_v4(&self, ttl: u32) -> Result<(), Errno>
pub fn multicast_ttl_v4(&self) -> Result<u32, Errno>
pub fn join_multicast_v4( &self, multiaddr: Ipv4Addr, iface: Ipv4Addr ) -> Result<(), Errno>
pub fn leave_multicast_v4( &self, multiaddr: Ipv4Addr, iface: Ipv4Addr ) -> Result<(), Errno>
pub fn join_multicast_v6( &self, multiaddr: Ipv6Addr, iface: u32 ) -> Result<(), Errno>
pub fn leave_multicast_v6( &mut self, multiaddr: Ipv6Addr, iface: u32 ) -> Result<(), Errno>
pub async fn send( &self, tasks: &dyn VirtualTaskManager, buf: &[u8], fd_flags: Fdflags ) -> Result<usize, Errno>
pub async fn send_to<M: MemorySize>( &self, tasks: &dyn VirtualTaskManager, buf: &[u8], addr: SocketAddr, fd_flags: Fdflags ) -> Result<usize, Errno>
pub async fn recv( &self, tasks: &dyn VirtualTaskManager, buf: &mut [MaybeUninit<u8>], fd_flags: Fdflags ) -> Result<usize, Errno>
pub async fn recv_from( &self, tasks: &dyn VirtualTaskManager, buf: &mut [MaybeUninit<u8>], fd_flags: Fdflags ) -> Result<(usize, SocketAddr), Errno>
pub fn shutdown(&mut self, how: Shutdown) -> Result<(), Errno>
pub async fn can_write(&self) -> bool
Trait Implementations§
source§impl Clone for InodeSocket
impl Clone for InodeSocket
source§fn clone(&self) -> InodeSocket
fn clone(&self) -> InodeSocket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for InodeSocket
impl Send for InodeSocket
impl Sync for InodeSocket
impl Unpin for InodeSocket
impl UnwindSafe for InodeSocket
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Upcastable for Twhere
T: Any + Debug + 'static,
impl<T> Upcastable for Twhere T: Any + Debug + 'static,
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref