View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 08:27 AM
David Rye
 
Posts: n/a
Default Re: Non Blocking Connect/Select AIX 4.2+

David Rye wrote:
>
> I am having a problem with non blocking socket I/O on AIX.
>
> When Performing a connect on a socket that is marked as non blocking the
> call
> returns immediately with errno set to 55 EINPROGRESS.
>
> This is as per the manual, for connect which goes on to say the you can
> determine
> when connect completes by calling select on the socket to check for
> errors and
> write ability.
>
> The snag I have is that when I compile the code on AIX the select blocks
> as expected until the connection process completes or the timer expires.
>
> However if it comes back before the timer expires it is always with the
> flag for
> write set and no error flag even if the server you are trying to connect
> to rejects the connection, or if the SYN/ACK exchange times out.
>
> The linux manual page for connect (Fedora 3) says to select on write and
> to
> call getsockopt on SO_ERROR to find out if the connect succeeded.
> I tried that but I am getting no error even when the connect fails.
>
> Has anyone else seen this problem?
>

Scratch that. My typing. AIX apears to follow the LINUX manual page.
Call connect,
Call select just on write.
Call getsockopt to find out the outcome.


> --
> J. David Rye
> http://www.roadrunner.uk.com
> http://www.rha.org.uk
> mailto://hostman@netman.road-runner.net


--
J. David Rye
http://www.roadrunner.uk.com
http://www.rha.org.uk
mailto://hostman@netman.road-runner.net
Reply With Quote