libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
JS_RMTClient Interface Reference

import "core.idl";

Public Member Functions

void send (string data)
void send (arraybuffer data)

Data Fields

optional attribute function on_data
optional attribute function on_close
readonly attribute string peer_address

Detailed Description

Object representing a monitoring websocket client

will be passed to the session rmt_on_new_client callback and to userws_on_new_client if the user websocket server is enabled

Member Function Documentation

◆ send() [1/2]

void JS_RMTClient::send ( string data)

sends data to the client on the websocket

Parameters
datathe data to send as a utf8 string
Here is the caller graph for this function:

◆ send() [2/2]

void JS_RMTClient::send ( arraybuffer data)

sends data to the client on the websocket

Parameters
datathe data to send as a binary arraybuffer
Here is the caller graph for this function:

Field Documentation

◆ on_data

optional attribute function JS_RMTClient::on_data

a callback called when the client receives data

the function shall be of type function(data) where data will be either of type string (for utf8 data) or arraybuffer (for binary data)

◆ on_close

optional attribute function JS_RMTClient::on_close

a callback called when the client disconnects or is deleted

◆ peer_address

readonly attribute string JS_RMTClient::peer_address

a string of format ip:port representing the client