websocket_broadcast: websocket_broadcast

Description Usage Arguments Details Value Author(s) Examples

View source: R/websockets.R

Description

Write data to all websocket clients associated with one websocket server.

Usage

1
websocket_broadcast(DATA, server)

Arguments

DATA

A character string or RAW vector to broadcast.

server

A websocket server environment returned by create_server.

Details

The HTML 5 Websocket API emulates a connection-oriented socket without a true broadcast capability. The websocket_broadcast function emulates a broadcast by sending the DATA payload to each connected client in a loop.

Value

The number of bytes sent is returned when successful (otherwise an error is thrown).

Author(s)

B. W. Lewis <blewis@illposed.net>

Examples

1
##

rstudio/R-Websockets documentation built on May 28, 2019, 4:33 a.m.