Expand description
Tunneling protocol for HTTP and WebSocket requests over persistent connections.
This crate provides types and utilities for tunneling HTTP and WebSocket requests through a persistent connection, enabling bidirectional communication between clients and servers. The tunnel protocol supports request streaming, packet ordering, and multiple encoding formats.
§Main Components
TunnelRequest- Tagged enum for HTTP, WebSocket, or abort requestsTunnelHttpRequest- HTTP request metadata and payloadTunnelWsRequest- WebSocket request metadata and payloadTunnelResponse- Response packets with headers, status, and body bytesTunnelStream- Async stream of response packets for a requestTunnelEncoding- Encoding format for response data (binary or base64)
§Features
base64(default) - Enables base64 encoding support for text-safe transmission
Structs§
- Tunnel
Abort Request - Request to abort an in-progress tunnel request.
- Tunnel
Http Request - HTTP request sent through the tunnel.
- Tunnel
Response - Response packet from a tunnel HTTP request.
- Tunnel
Stream - Stream of tunnel response packets.
- Tunnel
WsRequest - WebSocket request sent through the tunnel.
- Tunnel
WsResponse - Response for a WebSocket tunnel request.
Enums§
- Base64
Decode Error - Errors that can occur when decoding base64-encoded tunnel responses.
- TryFrom
Bytes Error - Errors that can occur when converting bytes to a tunnel response.
- Tunnel
Encoding - Encoding format for tunnel response data.
- Tunnel
Request - Request sent through the tunnel.
- Tunnel
Stream Error - Errors that can occur when streaming tunnel responses.