Skip to main content

Module ws

Module ws 

Source
Expand description

MPP WebSocket transport.

Implements [PubSubConnect] with automatic MPP 402 challenge/credential handshake at WebSocket connect time. Non-MPP servers are handled via a timeout-based fallback: if no challenge frame arrives within a short window after connecting, we assume the server is a plain JSON-RPC WebSocket.

Structsยง

MppWsConnect
WebSocket connector with automatic MPP payment at connect time.

Constantsยง

KEEPALIVE_INTERVAL ๐Ÿ”’
Keepalive ping interval (matches alloy-transport-ws default).
MPP_CHALLENGE_TIMEOUT ๐Ÿ”’
Timeout for waiting on an MPP challenge frame from the server.

Type Aliasesยง

TungsteniteStream ๐Ÿ”’