websocket_client: Websocket Client

websocket_clientR Documentation

Websocket Client

Description

Handle ambiorix websocket client.

Usage

copy_websocket_client(path)

get_websocket_client_path()

get_websocket_clients()

Arguments

path

Path to copy the file to.

Value

  • 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.

Functions

  • 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.

Examples

chat_ws <- function(msg, ws) {
  lapply(
    X = get_websocket_clients(),
    FUN = function(c) {
      c$send("chat", msg)
    }
  )
}

ambiorix documentation built on April 3, 2025, 9:34 p.m.