So I'm over on the openssl-users mailing list quite effectively baiting 
a flame war on select().  At this point it is just me and some other guy 
going back and forth on the intricacies of select().  He says that 
select() does NOT guarantee that a recv() that follows will be 
non-blocking while MSDN Library says the contrary:

http://msdn2.microsoft.com/en-us/library/ms740141.aspx

"The parameter readfds identifies the sockets that are to be checked for 
readability...<snip bind()/listen() stuff>...For other sockets, 
readability means that queued data is available for reading such that a 
call to recv, WSARecv, WSARecvFrom, or recvfrom is guaranteed not to block."

My target platform is Windows (obviously).

So, under what circumstances would a select() immediately followed by a 
recv() fail to be non-blocking despite the documentation saying 
otherwise?  Assume only a single thread of a single process has access 
to the socket handle/ID.

And, while I'm at it, I was under the general impression that select() 
under Windows was roughly the same under Linux.  Does the above also 
apply there?  The manpages don't really say either way (but maybe I just 
missed it).  You would think critical behavior like that would be 
documented somewhere.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to