Skip to main content

hung_server

Function hung_server 

Source
pub fn hung_server() -> SocketAddr
Expand description

Binds a loopback listener that accepts every connection and never sends a byte, and returns its address. It lives until the process exits.

It accepts on a thread, so it needs no runtime: a blocking client’s test has none, and an async test may pause its clock, which fires a client’s timeout the moment every task is idle.