Re: Issues with select
Re: Issues with select
- Subject: Re: Issues with select
- From: Aaron Ballman <email@hidden>
- Date: Fri, 30 Apr 2004 11:53:15 -0500
It's one of those great BSD sockets API design 'features'. For
non-blocking connects, select makes the socket writable when the
connection attempt is done. You then have to do something else to
see whether it was successful. The standard trick is to call
getpeername.
Oh goodie! ;-) After putting that check in, everything works as
expected again. Thanks for pointing that out!
Curiously, I've heard tell that at least some versions of Windows do
this correctly. That is, you can an error flag from select when the
connection fails. Be careful of this if you're writing cross
platform sockets code.
Thanks for the heads up.
~Aaron
--
In response to a stupid question I once asked: "My brain uses
patterns to format responses to your inputs, but I don't have one for
that. Do you speak German?" ~ Zola
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.