Re: TCP connect in Non Blocking Mode



David Schwartz wrote:
[snip]
Why would you think the answer would be yes? If the connection
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.
[snip]
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
.



Relevant Pages

  • Re: Best SA side
    ... Bob Dubery writes: ... is it reasonable to restrict yourself to players who you have ... In selecting the best SA side, ...
    (rec.sport.cricket)
  • Re: How can I exclude the "Notes" data when a GED file is extracted from FTM.
    ... place when you wrote the GED but for some reason they took it out. ... The process of selecting "Facts to import" doesn't allow you to choke ... The one I can't figure is that the Help file contains a page "Facts to ...
    (soc.genealogy.computing)
  • Re: JTree display update issue with new nodes - SOLVED
    ... Now the new nodes show up but for some reason ... there is a blank "line" displayed in the tree like this: ... Why would selecting the new node cause a blank line to ...
    (comp.lang.java.gui)
  • Re: WXI players who stood out
    ... > And Murali - although you won't given your views on his action. ... would be my number one pick as a pitcher if we were selecting a baseball ...
    (rec.sport.cricket)
  • Re: JPGs, Photodesk and Thump
    ... All the subsequent pages appear to be blank. ... Try selecting the Source links to the right of the Iyonix OK icons. ...
    (comp.sys.acorn.apps)