From: Doug McNaught <doug@wireboard.com>
To: Patrick Mau <mau@oscar.prima.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: connect() to localhost non-blocking.
Date: 21 Oct 2001 17:00:18 -0400 [thread overview]
Message-ID: <m3n12klndp.fsf@belphigor.mcnaught.org> (raw)
In-Reply-To: <20011021224221.A8560@oscar.dorf.de>
In-Reply-To: Patrick Mau's message of "Sun, 21 Oct 2001 22:42:21 +0200"
Patrick Mau <mau@oscar.prima.de> writes:
> I wrote a little test program to do some poll() benchmarks.
> I changed the host address to localhost and observed that
> connect() always returns EINPROGRESS when used with non-blocking
> sockets.
>
> >From the man page:
>
> EINPROGRESS
> The socket is non-blocking and the connection cannot be completed
> immediately. It is possible to select(2) or poll(2) for completion by
> selecting the socket for writing.
>
> So my question is:
>
> What is meant by 'cannot be completed immediately' ?
> I thought that connections to localhost would complete
> without any delay when the application listens ?
Probably the accept()ing process hasn't been scheduled yet.
EINPROGRESS is a perfectly reasonable response in such a case.
-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863
next prev parent reply other threads:[~2001-10-21 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-21 20:42 connect() to localhost non-blocking Patrick Mau
2001-10-21 21:00 ` Doug McNaught [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-21 23:18 Dan Kegel
2001-10-22 15:49 ` Patrick Mau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3n12klndp.fsf@belphigor.mcnaught.org \
--to=doug@wireboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mau@oscar.prima.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox