Hi, I'm wondering why when I put my socket in non-blocking I don't receive anything ?
When I send data to this socket, the following code works :
broadcastSocket.setBlocking(true);
broadcastSocket.bind(52001);
if(broadcastSocket.receive(udpp,ip,port) == sf::Socket::Done)
cout << "Data received" << endl;
but this one doesn't :
broadcastSocket.setBlocking(false);
broadcastSocket.bind(52001);
while(1)
{
if(broadcastSocket.receive(udpp,ip,port) == sf::Socket::Done)
cout << "Data received" << endl;
}
Thanks for your help !