Para acceder a las conexiones de cliente activas, puede usar la propiedad Connections para recorrer la lista y acceder a la clase de conexión de cliente. La propiedad Connections accede a una lista con hilos, por lo que primero debe bloquear la lista y, cuando haya terminado, desbloquearla.
procedure DoClientIPAddresses;
var
i: Integer;
oList: TList;
oConnection: TsgcWSConnectionServer;
begin
oList := TsgcWebSocketHTTPServer1.LockList;
Try
for i := 0 to oList.Count - 1 do
begin
oConnection := TsgcWSConnectionServer(TIdContext(oList[i]).Data);
ShowMessage(oConnection.IP + ':' + IntToStr(oConnection.Port));
end;
Finally
TsgcWebSocketHTTPServer1.UnLockList;
End;
end;