WsOverH3ServerStream
struct WsOverH3ServerStreamOne WebSocket tunnel on an HTTP/3 stream. The RFC 6455 rules live in :class:flare.ws.protocol.WsProtocol; outbound frames are unmasked (RFC 6455 sec 5.3) and queued on the stream.
Implements Copyable, Movable
- Fields
tunnel: Http3Tunnelproto: WsProtocolclosed: Bool
__init__
def __init__(out self, tunnel: Http3Tunnel, var initial: List[UInt8]) send_frame
def send_frame(mut self, mut listener: QuicListener, frame: WsFrame) Queue frame on the tunnel; a CLOSE frame ends it.
try_pull_frame
def try_pull_frame(mut self, mut listener: QuicListener) -> Optional[WsFrame] The next complete message as one TEXT or BINARY frame, a CLOSE frame once the session has ended (its reply already sent), or None until more data arrives.
is_closed
def is_closed(self) -> Bool close
def close(mut self, mut listener: QuicListener, code: UInt16 = UInt16(1000), reason: String = "") Send a CLOSE frame; the tunnel ends once it is sent.