pub struct MioNetwork {}Available on crate feature
net only.Trait Implementations§
Source§impl Default for MioNetwork
impl Default for MioNetwork
Source§fn default() -> MioNetwork
fn default() -> MioNetwork
Returns the “default value” for a type. Read more
Source§impl Network for MioNetwork
impl Network for MioNetwork
Source§fn udp_join_multicast_v4(
&self,
handle: &Handle,
multiaddr: &Ipv4Addr,
interface: &Ipv4Addr,
) -> Result<()>
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<()>
fn udp_join_multicast_v6( &self, handle: &Handle, multiaddr: &Ipv6Addr, interface: u32, ) -> Result<()>
Executes an operation of the
IPV6_ADD_MEMBERSHIP type. Read moreSource§fn udp_leave_multicast_v4(
&self,
handle: &Handle,
multiaddr: &Ipv4Addr,
interface: &Ipv4Addr,
) -> Result<()>
fn udp_leave_multicast_v4( &self, handle: &Handle, multiaddr: &Ipv4Addr, interface: &Ipv4Addr, ) -> Result<()>
Executes an operation of the
IP_DROP_MEMBERSHIP type. Read moreSource§fn udp_leave_multicast_v6(
&self,
handle: &Handle,
multiaddr: &Ipv6Addr,
interface: u32,
) -> Result<()>
fn udp_leave_multicast_v6( &self, handle: &Handle, multiaddr: &Ipv6Addr, interface: u32, ) -> Result<()>
Executes an operation of the
IPV6_DROP_MEMBERSHIP type. Read moreSource§fn udp_set_broadcast(&self, handle: &Handle, on: bool) -> Result<()>
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>
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>
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<()>
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>
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>>
fn udp_bind( &self, _waker: Waker, laddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>
Create udp socket and bind it to
laddrs. Read moreSource§fn udp_send_to(
&self,
waker: Waker,
socket: &Handle,
buf: &[u8],
target: SocketAddr,
) -> CancelablePoll<Result<usize>>
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 moreSource§fn udp_recv_from(
&self,
waker: Waker,
socket: &Handle,
buf: &mut [u8],
) -> CancelablePoll<Result<(usize, SocketAddr)>>
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>>
fn tcp_listener_bind( &self, _waker: Waker, laddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>
Source§fn tcp_listener_local_addr(&self, handle: &Handle) -> Result<SocketAddr>
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>
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<()>
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)>>
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>>
fn tcp_stream_connect( &self, _waker: Waker, raddrs: &[SocketAddr], ) -> CancelablePoll<Result<Handle>>
Source§fn tcp_stream_write(
&self,
waker: Waker,
socket: &Handle,
buf: &[u8],
) -> CancelablePoll<Result<usize>>
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>>
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>
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>
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>
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<()>
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>
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<()>
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<()>
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>>
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)>>
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>
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>>
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>
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>
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<()>
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>>
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>>
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§
impl Freeze for MioNetwork
impl RefUnwindSafe for MioNetwork
impl Send for MioNetwork
impl Sync for MioNetwork
impl Unpin for MioNetwork
impl UnwindSafe for MioNetwork
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