kathyayini
Programmer
I am using socketing and multi threading. Problem is when i fire 4 request to the server, the recv function fails for 1 request (recv function returns zero). I used pthread_cond_wait function before recv function but still getting the same problem. Client is sending all 4 requests properly, but server is not receiving one out of four request. waiting for the reply. functions are as follows :
pthread_cond_wait( &tCounter.cond, &tCounter.mutex);
nbytes = recv(socketId, filename, 101, MSG_NOSIGNAL);
pthread_cond_wait( &tCounter.cond, &tCounter.mutex);
nbytes = recv(socketId, filename, 101, MSG_NOSIGNAL);