Skip to main content

Module quic

Module quic 

Source
Expand description

Plain-Rust types for the QUIC per-stream metadata protocol. Plain-Rust types for the QUIC per-stream metadata protocol.

The wire format is Cap’n Proto (see quic_metadata_protocol.capnp); encoding and decoding happen here so the libcfd crate never touches capnp directly.

Structs§

ConnectRequest
The connection request sent by the edge on a data stream.
ConnectResponse
The connection response sent back to the edge.

Enums§

ConnectionType
The kind of connection the edge requests on a data stream.

Constants§

DATA_STREAM_PROTOCOL_SIGNATURE
Magic bytes that identify a data (request) stream, from cloudflared’s tunnelrpc/quic/protocol.go.
HTTP_HEADER_KEY
Prefix for per-header metadata entries (e.g. HttpHeader:content-type).
HTTP_HOST_KEY
Metadata key carrying the HTTP request host on a data stream.
HTTP_METHOD_KEY
Metadata key carrying the HTTP request method on a data stream.
HTTP_STATUS_KEY
Metadata key carrying the HTTP response status on a data stream.
PROTOCOL_V1
The per-stream protocol version (“01”).
RPC_STREAM_PROTOCOL_SIGNATURE
Magic bytes that identify an edge-initiated RPC stream.

Functions§

decode_connect_request_bytes
Decodes a ConnectRequest from serialized message bytes.
decode_connect_response_bytes
Decodes a ConnectResponse from serialized message bytes.
encode_connect_request
Encodes a ConnectRequest into a Cap’n Proto message (used by tests and the mock edge).
encode_connect_response
Encodes a ConnectResponse into a Cap’n Proto message.
read_connect_request
Reads a ConnectRequest message from a stream.
read_connect_response
Reads a ConnectResponse message from a stream (used by the mock edge).
write_connect_request
Writes a ConnectRequest message to a stream (used by the mock edge).
write_connect_response
Writes a ConnectResponse message to a stream.