I want to ask about something when I want to set timeout with specific socket i call this function
void Server::setReceiveTimeout(unsigned int timeout, SOCKET clientSocket)
{
if (setsockopt(clientSocket, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout)))
cout << "could not set socket option " << endl;
}
and it is working well
now my question
if i set the clientsocket to a specific timeout ..how could i return clientsocket back so there is no timeout?
for example settimeout(3000); recv
then after recv I want to return it back to the state where no time out How ?
your help will be greatly appreciated :)