Crate h2_ws_client

Crate h2_ws_client 

Source
Expand description

Minimal client-side WebSocket over HTTP/2 on top of hyper and tokio-tungstenite.

This crate provides a small abstraction that:

  • Establishes an HTTP/2 connection over an arbitrary I/O (TCP for now)
  • Issues an RFC 8441 extended CONNECT request with :protocol = "websocket"
  • Returns a tokio_tungstenite::WebSocketStream you can use as a normal WebSocket.

Structs§

H2WsConnection
An HTTP/2 connection that can open WebSocket streams via extended CONNECT.

Enums§

H2WsError
Errors that can occur when establishing or using an HTTP/2 WebSocket connection.

Type Aliases§

H2WebSocketStream
Type alias for the WebSocket stream used by this crate.