websocket_client | R Documentation |
Handle ambiorix websocket client.
copy_websocket_client(path)
get_websocket_client_path()
get_websocket_clients()
path |
Path to copy the file to. |
copy_websocket_client
: String. The new path (invisibly).
get_websocket_client_path
: String. The path to the local websocket client.
get_websocket_clients
: List. Websocket clients.
copy_websocket_client
Copies the websocket client file, useful when
ambiorix was not setup with the ambiorix generator.
get_websocket_client_path
Retrieves the full path to the local websocket client.
get_websocket_clients
Retrieves clients connected to the server.
chat_ws <- function(msg, ws) {
lapply(
X = get_websocket_clients(),
FUN = function(c) {
c$send("chat", msg)
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.