Crate ic_websocket_cdk

Source

Re-exports§

pub use types::CanisterWsSendResult;Deprecated
pub use types::CanisterCloseResult;
pub use types::CanisterSendResult;
pub use types::CanisterWsCloseArguments;
pub use types::CanisterWsCloseResult;
pub use types::CanisterWsGetMessagesArguments;
pub use types::CanisterWsGetMessagesResult;
pub use types::CanisterWsMessageArguments;
pub use types::CanisterWsMessageResult;
pub use types::CanisterWsOpenArguments;
pub use types::CanisterWsOpenResult;
pub use types::ClientPrincipal;
pub use types::OnCloseCallbackArgs;
pub use types::OnMessageCallbackArgs;
pub use types::OnOpenCallbackArgs;
pub use types::WsHandlers;
pub use types::WsInitParams;

Modules§

types

Macros§

custom_print
custom_trap

Functions§

close
Closes the connection with the client.
init
Initialize the CDK.
send
Sends a message to the client. The message must already be serialized using Candid. Use candid::encode_one to serialize the message.
wipe
Resets the internal state of the IC WebSocket CDK.
ws_close
Handles the WS connection close event received from the WS Gateway.
ws_get_messages
Returns messages to the WS Gateway in response of a polling iteration.
ws_message
Handles the WS messages received either directly from the client or relayed by the WS Gateway.
ws_open
Handles the WS connection open event sent by the client and relayed by the Gateway.