Skip to main content

Crate spdy_mux

Crate spdy_mux 

Source
Expand description

SPDY/3.1 stream multiplexer over WebSocket transports.

SPDY codec, flow-controlled stream multiplexing, and a fastwebsockets transport adapter. Built for Kubernetes port-forward tunneling but works with any SPDY peer.

Structs§

DataStream
Data half of a split SPDY stream: AsyncRead (from pod) + AsyncWrite (to pod). Lazy open fires on the first non-empty write through this half.
ErrorStream
Error half of a split SPDY stream: AsyncRead only (pod error messages).
FastWsReader
fastwebsockets read half adapter.
FastWsWriter
fastwebsockets write half adapter.
MuxConfig
Configurable limits for the SPDY multiplexer. Replaces all former hardcoded constants. Passed through MuxHandle::spawn() and open_portforward_pair().
RawSpdyReader
Raw-transport read half: reads SPDY frame bytes from the underlying AsyncRead and yields them as WsMessage::Binary chunks. The mux reader accumulates the chunks into its own buffer and decodes complete SPDY frames from there, so chunk boundaries need not align with frame boundaries.
RawSpdyWriter
Raw-transport write half: writes SPDY frame bytes directly to the underlying AsyncWrite with no WebSocket framing.
Session
SPDY/3.1 session: one or more transport connections carrying paired streams to a SPDY peer.
Stream
Bidirectional SPDY/3.1 stream pair: a writable “data” stream plus an “error” stream half-closed at open time. The shape suits any peer that uses paired streams (Kubernetes port-forward is one such peer; the multiplexer treats the headers as opaque).

Enums§

Error
WsMessage
Decoded WebSocket message returned by WsFrameReader.

Traits§

WsFrameReader
Async reader for WebSocket frames.
WsFrameWriter
Async writer for WebSocket binary frames.

Functions§

split_fastws
Construct fastwebsockets writer/reader adapters from a raw upgraded HTTP connection.
split_raw_spdy
Construct raw SPDY writer/reader adapters from an already-upgraded connection. Use this for the legacy Upgrade: SPDY/3.1 path where the apiserver speaks raw SPDY frames (no WebSocket envelope).