This is my loop;
for (sf::TcpSocket &client : clients)
{
...
}
In the loop, I would like to check if someone has disconnected, and if so, remove them from the list of users, I just don't know how to check which user it is up to in the list.
The list of users is a vector of 100 sf::tcpsockets in the loop if someone has disconnected I just skip the rest of the code with a continue statement.
I check if they have disconnected by sending "ping" over and if no response is given, then they disconnected.
There is one list of users, that being named clients