[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: connect() to localhost non-blocking.
From:       Patrick Mau <mau () oscar ! prima ! de>
Date:       2001-10-22 15:49:59
[Download RAW message or body]

On Sun, Oct 21, 2001 at 04:18:10PM -0700, Dan Kegel wrote:
> > Patrick Mau <mau@oscar.prima.de> writes:
> > 

[Snip]

> You have to be prepared to handle both immediate and delayed
> connection, especially if you want to be portable.  (Solaris behaves 
> a bit differently than Linux in this regard.)  See
> http://www.kegel.com/dkftpbench/dkftpbench-0.37/ftp_client_pipe.cc
> for an example of how to handle nonblocking connects more or less portably.
> (You have to wade through quite a bit of code, tabstops 4, to find
> all the connect-handling stuff -- sorry.)
> - Dan

Hallo Dan,

thnaks for the pointer and your remarks, but I really
wondered if linux _never_ immediatly accept()'s connections.

I never saw a connect() call returning 0 (connected) on a
non-blocking socket. Always EINPROGRESS. I guess I have to
look at the kernel to see scheduling effects ...

thanks,
Patrick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic