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).

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>,

§

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>,

§

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.