public bool WebsocketIsConnected(int connection = 0)
0
The index of the WebSocket Client
Zero-indexed based on the order you see in Servers/Clients > WebSocket Clients
e.g. The first client in the list is 0, the second client in the list is 1, and so on...
bool
using System;
public class CPHInline
{
public bool Execute()
{
//Check if the custom websocket client with index 0 is connected
//Index is from top to bottom of the clients list, starting at 0
bool isConnected = CPH.WebsocketIsConnected(0);
if(isConnected){
CPH.SendMessage("Websocket client is connected!");
}
return true;
}
}