Hello,
It's the same that with Indy. First Lock the connection list, iterate and the unlock the list. Find below an example for CBuilder
TList* oList;
oList = sgcWebSocketServer1->LockList();
try
{
for (int i = 0; i < oList->Count; i++)
{
TIdContext* Context = static_cast<TIdContext*>(oList->Items[i]);
TsgcWSConnection* Connection = static_cast<TsgcWSConnection*>(Context->Data);
}
}
__finally
{
sgcWebSocketServer1->UnLockList();
}
Kind Regards,
Sergio