Re: recv() hang
- From: "Volodymyr Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Mon, 4 May 2009 14:30:36 +0200
"naveen gupta" <gupta.naveen16@xxxxxxxxx> wrote in message
news:a320d2b3-aedc-4554-b479-ecff4017af98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i did not used WSAGetLastError bcoz select() is continusly returning
-1
Look at http://msdn.microsoft.com/en-us/library/ms740141(VS.85).aspx . It
says the following: "The select function returns the total number of socket
handles that are ready and contained in the fd_set structures, zero if the
time limit expired, or SOCKET_ERROR if an error occurred. If the return
value is SOCKET_ERROR, WSAGetLastError can be used to retrieve a specific
error code.". If I recall corretly, SOCKET_ERROR is exactly -1, so why don't
you want to get extended error information?
and if there is problem in select() then data should not be
received continusly
Documentation clearly states that if select(...) is successfull it should
return something not equal to -1. So I suggest you the following:
1. Read documentation with attention
2. Check return values of functions
3. If possible, post your code snipped here, we are not telepates, sorry.
--
Volodymyr M. Shcherbyna, blog: http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
.
- References:
- recv() hang
- From: naveen gupta
- Re: recv() hang
- From: Dave Lowther
- Re: recv() hang
- From: naveen gupta
- Re: recv() hang
- From: m
- Re: recv() hang
- From: naveen gupta
- Re: recv() hang
- From: Volodymyr Shcherbyna
- Re: recv() hang
- From: naveen gupta
- Re: recv() hang
- From: Volodymyr Shcherbyna
- Re: recv() hang
- From: naveen gupta
- recv() hang
- Prev by Date: Re: recv() hang
- Next by Date: Re: Why Windows XP and above sometimes only sees IGMPv2
- Previous by thread: Re: recv() hang
- Next by thread: Re: recv() hang
- Index(es):
Relevant Pages
|