MioNetwork

Struct MioNetwork 

Source
pub struct MioNetwork {}
Available on crate feature net only.
Expand description

This type implements the system call Network using the underlying mio.

Trait Implementations§

Source§

impl Default for MioNetwork

Source§

fn default() -> MioNetwork

Returns the “default value” for a type. Read more
Source§

impl Network for MioNetwork

Source§

fn udp_join_multicast_v4( &self, handle: &Handle, multiaddr: &Ipv4Addr, interface: &Ipv4Addr, ) -> Result<()>

Executes an operation of the IP_ADD_MEMBERSHIP type. Read more
Source§

fn udp_join_multicast_v6( &self, handle: &Handle, multiaddr: &Ipv6Addr, interface: u32, ) -> Result<()>

Executes an operation of the IPV6_ADD_MEMBERSHIP type. Read more
Source§

fn udp_leave_multicast_v4( &self, handle: &Handle, multiaddr: &Ipv4Addr, interface: &Ipv4Addr, ) -> Result<()>

Executes an operation of the IP_DROP_MEMBERSHIP type. Read more
Source§

fn udp_leave_multicast_v6( &self, handle: &Handle, multiaddr: &Ipv6Addr, interface: u32, ) -> Result<()>

Executes an operation of the IPV6_DROP_MEMBERSHIP type. Read more
Source§

fn udp_set_broadcast(&self, handle: &Handle, on: bool) -> Result<()>

Sets the value of the SO_BROADCAST option for this socket. When enabled, this socket is allowed to send packets to a broadcast address.
Source§

fn udp_broadcast(&self, handle: &Handle) -> Result<bool>

Gets the value of the SO_BROADCAST option for this socket. For more information about this option, see udp_set_broadcast.
Source§

fn udp_ttl(&self, handle: &Handle) -> Result<u32>

Gets the value of the IP_TTL option for this socket. For more information about this option, see tcp_listener_set_ttl.
Source§

fn udp_set_ttl(&self, handle: &Handle, ttl: u32) -> Result<()>

Sets the value for the IP_TTL option on this socket. This value sets the time-to-live field that is used in every packet sent from this socket.
Source§

fn udp_local_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the local socket address bound to this udp socket.
Source§

fn udp_bind( &self, _waker: Waker, laddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>

Create udp socket and bind it to laddrs. Read more
Source§

fn udp_send_to( &self, waker: Waker, socket: &Handle, buf: &[u8], target: SocketAddr, ) -> CancelablePoll<Result<usize>>

Sends data on the socket to the given target address. Read more
Source§

fn udp_recv_from( &self, waker: Waker, socket: &Handle, buf: &mut [u8], ) -> CancelablePoll<Result<(usize, SocketAddr)>>

Receives data from the socket. Read more
Source§

fn tcp_listener_bind( &self, _waker: Waker, laddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>

Create new TcpListener which will be bound to the specified laddrs Read more
Source§

fn tcp_listener_local_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the local socket address bound to this tcp listener.
Source§

fn tcp_listener_ttl(&self, handle: &Handle) -> Result<u32>

Gets the value of the IP_TTL option for this socket. For more information about this option, see tcp_listener_set_ttl.
Source§

fn tcp_listener_set_ttl(&self, handle: &Handle, ttl: u32) -> Result<()>

Sets the value for the IP_TTL option on this socket. This value sets the time-to-live field that is used in every packet sent from this socket.
Source§

fn tcp_listener_accept( &self, waker: Waker, handle: &Handle, ) -> CancelablePoll<Result<(Handle, SocketAddr)>>

Accepts a new incoming connection to this tcp listener. Read more
Source§

fn tcp_stream_connect( &self, _waker: Waker, raddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>

Create a new TcpStream and connect to raddrs. Read more
Source§

fn tcp_stream_write( &self, waker: Waker, socket: &Handle, buf: &[u8], ) -> CancelablePoll<Result<usize>>

Sends data on the socket to the remote address Read more
Source§

fn tcp_stream_read( &self, waker: Waker, socket: &Handle, buf: &mut [u8], ) -> CancelablePoll<Result<usize>>

Receives data from the socket. Read more
Source§

fn tcp_stream_local_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the local socket address bound to this tcp stream.
Source§

fn tcp_stream_remote_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the remote socket address this tcp stream connected.
Source§

fn tcp_stream_nodelay(&self, handle: &Handle) -> Result<bool>

Gets the value of the TCP_NODELAY option on this socket. For more information about this option, see tcp_stream_set_nodelay.
Source§

fn tcp_stream_set_nodelay(&self, handle: &Handle, nodelay: bool) -> Result<()>

Sets the value of the TCP_NODELAY option on this socket. Read more
Source§

fn tcp_stream_ttl(&self, handle: &Handle) -> Result<u32>

Gets the value of the IP_TTL option for this socket. For more information about this option, see tcp_listener_set_ttl.
Source§

fn tcp_stream_set_ttl(&self, handle: &Handle, ttl: u32) -> Result<()>

Sets the value for the IP_TTL option on this socket. This value sets the time-to-live field that is used in every packet sent from this socket.
Source§

fn tcp_stream_shutdown(&self, handle: &Handle, how: Shutdown) -> Result<()>

Shuts down the read, write, or both halves of this connection. This function will cause all pending and future I/O on the specified portions to return immediately with an appropriate value (see the documentation of Shutdown).
Source§

fn unix_listener_bind( &self, _waker: Waker, path: &Path, ) -> CancelablePoll<Result<Handle>>

Creates a new UnixListener bound to the specified socket path.
Source§

fn unix_listener_accept( &self, waker: Waker, handle: &Handle, ) -> CancelablePoll<Result<(Handle, SocketAddr)>>

Accepts a new incoming connection to this listener. The call is responsible for ensuring that the listening socket is in non-blocking mode.
Source§

fn unix_listener_local_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the local socket address of this listener.
Source§

fn unix_stream_connect( &self, _waker: Waker, path: &Path, ) -> CancelablePoll<Result<Handle>>

Connects to the unix socket named by address.
Source§

fn unix_stream_local_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the socket address of the local half of this connection.
Source§

fn unix_stream_peer_addr(&self, handle: &Handle) -> Result<SocketAddr>

Returns the socket address of the remote half of this connection.
Source§

fn unix_stream_shutdown(&self, handle: &Handle, how: Shutdown) -> Result<()>

huts down the read, write, or both halves of this connection. This function will cause all pending and future I/O calls on the specified portions to immediately return with an appropriate value (see the documentation of Shutdown).
Source§

fn unix_stream_write( &self, waker: Waker, socket: &Handle, buf: &[u8], ) -> CancelablePoll<Result<usize>>

Sends data on the socket to the remote address Read more
Source§

fn unix_stream_read( &self, waker: Waker, socket: &Handle, buf: &mut [u8], ) -> CancelablePoll<Result<usize>>

Receives data from the socket. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.