Home away from home
Joined: 2007/5/19 14:23 Last Login
: 1/2 17:30
From England
Group:
Registered Users
|
I'm trying to make Connect() be non-blocking. It seems to work if I use WaitSelect() to wait for ONLY that socket, before calling Send().
But if I wait on several sockets, then Send() _almost_ always gives the ENOTCONN error, which seems to imply that Connect() wasn't ready after all.
It's quite possible there's some stupid bug in my code somewhere (damned it I can see it), but I wondered if anyone was aware of any subtle "gotchas" that I might have overlooked? For example, is it possible for WaitSelect() to indicate an event has arrived for a particular socket, without Connect() actually being ready yet?
edit: And even more annoyingly, if I make it print extra debug info, then suddenly it seems to work. Which seems to suggest some kind of timing issue, although I don't know what.
Edited by ChrisH on 2016/8/7 21:21:40
|