Re: TCP connect in Non Blocking Mode
- From: Alex Fraser <me@xxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 23:24:18 +0100
David Schwartz wrote:
[snip]
Why would you think the answer would be yes? If the connection[snip]
succeeds, a write will not block. So selecting for writability will
detect this case. If the connection fails, a write will not block. So
selecting for writability will detect this case.
Nothing is wrong with the OP's program at the top of this thread.
The OP wrote that "when the server refuses connection ... select waits for 30 seconds and later returns timing out."
If this is true, either there *is* something wrong with the OP's code or selecting for writability *does not* detect this case (for the OP).
I believe this was Alan's point.
[snip]
The reason he wasn't detecting a connection error was already fixed
when he posted this thread. That's why he says, in the first post,
that it's now working.
Huh?
Alex
.
- References:
- TCP connect in Non Blocking Mode
- From: Prabhu
- Re: TCP connect in Non Blocking Mode
- From: Rainer Temme
- Re: TCP connect in Non Blocking Mode
- From: David Schwartz
- Re: TCP connect in Non Blocking Mode
- From: Rainer Temme
- Re: TCP connect in Non Blocking Mode
- From: David Schwartz
- Re: TCP connect in Non Blocking Mode
- From: Rainer Temme
- Re: TCP connect in Non Blocking Mode
- From: Rainer Weikusat
- Re: TCP connect in Non Blocking Mode
- From: Alex Fraser
- Re: TCP connect in Non Blocking Mode
- From: Rainer Weikusat
- Re: TCP connect in Non Blocking Mode
- From: David Schwartz
- Re: TCP connect in Non Blocking Mode
- From: Alan McKenney
- Re: TCP connect in Non Blocking Mode
- From: David Schwartz
- TCP connect in Non Blocking Mode
- Prev by Date: Re: sharing memory map between processes (same parent)
- Next by Date: Re: TCP connect in Non Blocking Mode
- Previous by thread: Re: TCP connect in Non Blocking Mode
- Next by thread: Re: TCP connect in Non Blocking Mode
- Index(es):
Relevant Pages
|