Function trillium_testing::with_socket[][src]

pub fn with_socket<H, Fun, Fut>(handler: H, tests: Fun) where
    H: Handler,
    Fun: FnOnce(BoxedTransport) -> Fut,
    Fut: Future<Output = Result<(), Box<dyn Error>>>, 
Expand description

start a trillium server on a random port for the provided handler, establish a tcp connection, run the provided test function with that tcp stream, and shut down the server.