I've got a problem with my select function. every time i call it, it's returning '1', indicating that from a socket can be read.
here's a part of my code:
my Problem is, that i'm recv()'ing after the select() on the same socket (where isn't all the time data available) so my program blocks for the time, no data recieved.Code:struct timeval pTimeval; pTimeval.tv_sec = 0; pTimeval.tv_usec = 0; FD_ZERO(&fdRead); FD_SET(Socket, &fdRead); iRet = select(Socket + 1, &fdRead, NULL, NULL, &pTimeval); if (FD_ISSET(Socket, &fdRead)) iRet = recv(Socket, buffer, SIZE, 0);
plz help me.