WebsocketBroadcastJson

Send a JSON payload to all clients connected to the Streamer.bot WebSocket Server

Signature

public void WebsocketBroadcastJson(string data)

Parameters

data
string required

The stringified JSON payload to send to clients

Return Type

void

Example

using System;
public class CPHInline
{
    public bool Execute()
    {
        //Define data you want to send
        string json = "{\"foo\":\"bar\"}";

        //Broadcast data to clients
        CPH.WebsocketBroadcastJson(json); 
        return true;
    }
}