Expand description
WebSocket transport for JMAP (RFC 8887).
Provides connect_ws which establishes a WebSocket connection and
returns a WsSession for sending and receiving frames.
URL source: Session::capabilities["urn:ietf:params:jmap:websocket"].url
(the session document advertises the WebSocket endpoint).
Structs§
- WsReceiver
- Owning receive-half of a WebSocket connection (bd:JMAP-6r7c.31).
- WsSender
- Owning send-half of a WebSocket connection (bd:JMAP-6r7c.31).
- WsSession
- An established JMAP WebSocket session (RFC 8887).
Enums§
- WsFrame
- A parsed frame received from the JMAP WebSocket.
Constants§
- DEFAULT_
WS_ MAX_ MESSAGE_ BYTES - Maximum WebSocket message size (1 MiB), consistent with the SSE frame limit.
Prevents a misbehaving or hostile server from forcing the client to buffer
large messages over the event connection.
Default per-message / per-frame byte cap for WebSocket connections opened
via
connect_ws(which does not take a limit parameter). Callers that need a different cap should useconnect_ws_with_limitor thecrate::JmapClient::connect_ws_sessionconvenience method which reads themax_ws_messagefield fromClientConfig. Default: 1 MiB.
Functions§
- connect_
ws - Open a JMAP WebSocket connection (RFC 8887).
- connect_
ws_ with_ limit - Establish a WebSocket connection with an explicit per-message / per-frame byte cap.