From: Patrick Mau <mau@oscar.prima.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: connect() to localhost non-blocking.
Date: Sun, 21 Oct 2001 22:42:21 +0200 [thread overview]
Message-ID: <20011021224221.A8560@oscar.dorf.de> (raw)
Hallo all,
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 ?
thanks for your answers,
Patrick
next reply other threads:[~2001-10-21 20:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-21 20:42 Patrick Mau [this message]
2001-10-21 21:00 ` Doug McNaught
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=20011021224221.A8560@oscar.dorf.de \
--to=mau@oscar.prima.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®