WsWireChoice
struct WsWireChoiceStable codepoints for the wire :class:WsAutoClient picks after the runtime negotiation completes. The reactor / call- site dispatches on these to pick the carrier driver.
Implements Movable
comptime UNDETERMINED = Int(0)The dispatcher hasn't run :meth:WsAutoClient.connect yet. The initial carrier state.
comptime HTTP_1_1 = Int(1)RFC 6455 over an HTTP/1.1 Upgrade stream. Used when: - the URL scheme is ws:// (no TLS, no ALPN), OR - prefer_h2 = False, OR - the TLS handshake negotiated ALPN http/1.1, OR - the negotiated h2 connection didn't advertise ENABLE_CONNECT_PROTOCOL = 1 (RFC 8441 §3).
comptime HTTP_2 = Int(2)RFC 8441 Extended CONNECT over an HTTP/2 stream. Used when the URL scheme is wss://, prefer_h2 = True, the TLS handshake negotiated ALPN h2, and the negotiated h2 connection's SETTINGS frame includes ENABLE_CONNECT_PROTOCOL = 1.
comptime FAILED = Int(3)The dispatcher attempted to connect but the underlying TCP / TLS / h2 handshake failed before reaching the application protocol decision. See :attr:WsAutoClient.last_error for the per-attempt reason.