Skip to main content

accept

Function accept 

Source
pub async fn accept(
    listener: &TcpListener,
) -> Result<(TcpStream, SocketAddr), Error>
Expand description

Accepts one connection, for a caller driving an accept loop of its own.

The CLI’s and the SDKs’ loop is super::serve::serve_forward, which takes the stop, the limit and a callback as parameters; this is for a caller that wants the primitive.