Skip to main content

subscribe

Function subscribe 

Source
pub(super) async fn subscribe<C: JsonRpcCodec>(
    send_request: SendRequest<OpenStreams, Bytes>,
    config: &HttpConfig,
    msg: Value,
    codec: &C,
) -> Result<(Response, RequestStream<SendStream<Bytes>, Bytes>, H3Reader<C>)>
Expand description

Subscribe over HTTP/3: send the request with the body left open, read the initial response, and return the send half and the reader for notifications.