WebsocketCustomServerCloseSession

Disconnect a session from a custom WebSocket server

Signature

public void WebsocketCustomServerCloseSession(string sessionId, int connection = 0)

Parameters

sessionId
string required

The unique id of the client session to disconnect

connection
int
Default:
0

No description provided.

Return Type

void

Example

using System;
public class CPHInline
{
    public bool Execute()
    {
        //Define session Id
        string sessionId = "JdHd4aVd";

        //Close session of custom websocket server index 0
        //Index is from top to bottom of the clients list, starting at 0
        CPH.WebsocketCustomServerCloseSession(sessionId, 0); 
        return true;
    }
}