Function ic_websocket_cdk::ws_send
source · pub fn ws_send(
client_principal: ClientPrincipal,
msg_bytes: Vec<u8>
) -> CanisterWsSendResultExpand description
Sends a message to the client. The message must already be serialized, using a method of your choice, like Candid or CBOR.
Under the hood, the message is serialized and certified, and then it is added to the queue of messages that the WS Gateway will poll in the next iteration.