OK Here's my full code:
CountinewWithPlayer = 1;
while (CountinewWithPlayer)
{
std::size_t Receiveda = 0;
sf::Socket::Status status;
char MessageLivea[25600];
cout << "2" << endl;
status = (Client.Receive(MessageLivea, sizeof(MessageLivea), Receiveda));
cout << "3" << endl;
if ( status != sf::Socket::Done)
{
cout << "disonnected" << endl;
CountinewWithPlayer = 0;
}
}
If I just close the client program, it's ok, disconnected. If lost connection on client, it prints 1, 2, but not 3, and not disconnecting the player. Why is that happening?
Thanks!