WsOverH3Stream
struct WsOverH3StreamImplements Movable
- Fields
stream_id: UInt64read_buffer: List[UInt8]closed: Boolmax_frame_size: Int
__init__
def __init__(out self, stream_id: UInt64) open
def open(mut h3: Http3ClientConnection, authority: String, path: String, timeout_ms: Int = Int(5000)) -> Self Open the tunnel: wait for the server's SETTINGS, which must enable extended CONNECT (RFC 9220 sec 3), send the CONNECT and require a 200.
send_frame
def send_frame(mut self, mut h3: Http3ClientConnection, frame: WsFrame) Send frame masked; a CLOSE frame ends our sending.
try_pull_frame
def try_pull_frame(mut self, mut h3: Http3ClientConnection, timeout_ms: Int = Int(100)) -> Optional[WsFrame] The next server frame, or None until one has arrived.
close
def close(mut self, mut h3: Http3ClientConnection, code: UInt16 = UInt16(1000)) Send CLOSE and end the stream.