1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-20 10:00:46 +02:00
Files
OpenIntegrations/docs/en/examples/WebSocket/GetConnectionList.txt
T

20 lines
664 B
Plaintext
Vendored

// Server start
LaunchPort = 9894;
ServerObject = OPI_WebSocket.StartServer(LaunchPort);
// Creating multiple client connections
ConnectionAddress = "ws://127.0.0.1:9894";
Client1 = OPI_WebSocket.CreateConnection(ConnectionAddress);
Client2 = OPI_WebSocket.CreateConnection(ConnectionAddress);
If Not OPI_WebSocket.IsClientObject(Client1) Then
Raise OPI_Tools.JSONString(Client1);
EndIf;
If Not OPI_WebSocket.IsClientObject(Client2) Then
Raise OPI_Tools.JSONString(Client2);
EndIf;
// Getting a list of active connections on the server
Result = OPI_WebSocket.GetConnectionList(ServerObject);