WsRequestSender typedef
A function that sends a request over a connection that is not usable yet.
Fails once the connection attempt it was handed to is no longer the one in flight, so credentials loaded for an abandoned attempt are not sent over the connection that replaced it.
Implementation
typedef WsRequestSender = Result<void> Function(WsRequest request);