From: Will Brown <dr.hfuhruhurr@gmail.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PROBLEM: Epoll frequently fails to notify connects at connect bursts
Date: Wed, 26 Aug 2009 11:15:10 +0200 [thread overview]
Message-ID: <8a1bd2320908260215w23d1f426x33f90e38ccc3fe2c@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0908251823470.18518@makko.or.mcafeemobile.com>
On Wed, Aug 26, 2009 at 3:24 AM, Davide Libenzi<davidel@xmailserver.org> wrote:
> On Tue, 25 Aug 2009, Davide Libenzi wrote:
>
>> Multiple quasi-simultaneous events for the same fd are merged. This is why
>> on POLLIN on accepting sockets you want to do something like:
>>
>> while ((afd = accept(sfd, ...)) != -1)
>> add_client(afd);
>
> Of course, with sfd in non-blocking mode. Alternatively, you drop EPOLLET
> for the sfd socket.
>
Aha! Thank you immensely Davide. It cost me one week of frustration already.
1. Where should I have picked up this gem of essential information? I
haven't seen it in the man-pages for either 'epoll' or 'accept'.
2. Is it better to use a level-triggered listener socket, or to use
the accept-loop?
Thanks a million,
Will
next prev parent reply other threads:[~2009-08-26 9:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 0:48 Will Brown
2009-08-26 1:14 ` Davide Libenzi
2009-08-26 1:24 ` Davide Libenzi
2009-08-26 9:15 ` Will Brown [this message]
2009-08-26 12:26 ` Mark Brown
2009-08-26 15:04 ` Davide Libenzi
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=8a1bd2320908260215w23d1f426x33f90e38ccc3fe2c@mail.gmail.com \
--to=dr.hfuhruhurr@gmail.com \
--cc=davidel@xmailserver.org \
--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®