_TCPServer_ListClients
Previous Top Next

_TCPServer_ListClients ( )

Returns all the possible connection IDs and the socket running on it.

Return value: Array

$aArray[0] = currently active clients
$aArray[1] = socket ID of the client 1, or 0 if no client connected
$aArray[n] = socket ID of the client n, or 0 if no client connected

Note that if two users connect, they will have connection IDs 1 and 2. But if the user 1 disconnects, the user 2 will still being called "2". However, $aArray[1] will be 0 and $aArray[2] will be the socket ID for the client 2.