Skip to main content

client_request

Function client_request 

Source
pub async fn client_request(conn: &Connection, request: &[u8]) -> Result<Bytes>
Expand description

Client-side helper: open a bidi stream on hyprstream-rpc/1 against an already-connected iroh [Connection], write the request, read the response.

Primitive used by tests and internally by super::iroh_transport::IrohTransport — production callers should construct an IrohTransport + crate::rpc_client::RpcClientImpl instead.