Struct wasmer_wasix::net::socket::InodeSocket
source · pub struct InodeSocket {
pub(crate) inner: Arc<InodeSocketInner>,
}
Fields§
§inner: Arc<InodeSocketInner>
Implementations§
source§impl InodeSocket
impl InodeSocket
pub fn new(kind: InodeSocketKind) -> Self
pub fn poll_read_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<usize>>
pub fn poll_write_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<usize>>
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, nonblocking: bool, timeout: Option<Duration>, ) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr), Errno>
pub fn close(&self) -> Result<(), Errno>
pub async fn connect( &mut self, tasks: &dyn VirtualTaskManager, net: &dyn VirtualNetworking, peer: SocketAddr, timeout: Option<Duration>, nonblocking: bool, ) -> 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], timeout: Option<Duration>, nonblocking: bool, ) -> Result<usize, Errno>
pub async fn send_to<M: MemorySize>( &self, tasks: &dyn VirtualTaskManager, buf: &[u8], addr: SocketAddr, timeout: Option<Duration>, nonblocking: bool, ) -> Result<usize, Errno>
pub async fn recv( &self, tasks: &dyn VirtualTaskManager, buf: &mut [MaybeUninit<u8>], timeout: Option<Duration>, nonblocking: bool, ) -> Result<usize, Errno>
pub async fn recv_from( &self, tasks: &dyn VirtualTaskManager, buf: &mut [MaybeUninit<u8>], timeout: Option<Duration>, nonblocking: bool, ) -> 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 Freeze for InodeSocket
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§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>
Returns the layout of the type.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
§impl<T> Upcastable for T
impl<T> Upcastable for T
§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
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn