Crate ic_websocket_cdk
source ·Macros
Structs
- The arguments for [ws_close].
- The arguments for [ws_get_messages].
- The arguments for [ws_message].
- The arguments for [ws_open].
- Arguments passed to the
on_closehandler. - Arguments passed to the
on_messagehandler. Themessageargument is the message received from the client, serialized in Candid. To deserialize the message, use candid::decode_one. - Arguments passed to the
on_openhandler. - Handlers initialized by the canister and triggered by the CDK.
- Parameters for the IC WebSocket CDK initialization. For default parameters and simpler initialization, use
WsInitParams::new.
Functions
- Initialize the CDK.
- Resets the internal state of the IC WebSocket CDK.
- Handles the WS connection close event received from the WS Gateway.
- Returns messages to the WS Gateway in response of a polling iteration.
- Handles the WS messages received either directly from the client or relayed by the WS Gateway.
- Handles the WS connection open event sent by the client and relayed by the Gateway.
- Sends a message to the client. The message must already be serialized using Candid. Use candid::encode_one to serialize the message.
Type Aliases
- The result of [ws_close].
- The result of [ws_get_messages].
- The result of [ws_message].
- The result of [ws_open].
- The result of [ws_send].