Crate cap_net_ext

source ·
Expand description

Extension traits for TcpListener, UdpSocket, and Pool.

cap-std’s TcpListener, following the Rust standard library TcpListener, combines the socket, bind, listen, and connect operations of the POSIX socket API into a single bind or connect operation. In some use cases, it’s desirable to perform the steps separately.

This API adds extension traits to cap-std’s TcpListener, UdpSocket, and Pool which support the following sequence for accepting incoming connections:

and the following sequence for initiating outgoing connections:

TcpListenerExt::new and TcpListener::accept_with additionally have Blocking arguments for requesting non-blocking operation.

Similar API adaptations are available for UDP sockets as well.

Structs§

Enums§

Traits§