SO_RCVTIMEO not working for nonblocking socket
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I had set timeout with int n = 20000; setsockopt(ClientSocket,SOL_SOCKET,SO_RCVTIMEO,(char*)&n,sizeof(int); and set mode nonblocking with function call int iMode = 1; ioctlsocket(ClientSocket,FIONBIO,(u_long FAR*)&iMode) if i set mode to nonblocking than timeout is not called in recv(). but if i do it with mode blocking (default) than every thing is working fine and timeout called.but i have to work with non blocking mode so anybody can tell me how can i set timeout in nonblocking socket. or why i dont get timeout ,i missed something plz reply. Thanx in advance. :)