ws_mock::utils

Function send_to_server

source
pub async fn send_to_server(
    server: &WsMockServer,
    message: String,
) -> SplitStream<WebSocketStream<MaybeTlsStream<TcpStream>>>
Expand description

Send a single message to the server, and return the SplitStream receiver created by connecting to the server.

Useful for one-off messages and optionally reading responses afterwards.