lkml.org 
[lkml]   [2001]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: connect() to localhost non-blocking.
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/

\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.036 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site