Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Aug 1998 12:02:23 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        mike@smith.net.au (Mike Smith)
Cc:        oppermann@pipeline.ch, hackers@FreeBSD.ORG
Subject:   Re: combined accept&read
Message-ID:  <199808201002.MAA26820@labinfo.iet.unipi.it>
In-Reply-To: <199808192319.XAA01112@dingo.cdrom.com> from "Mike Smith" at Aug 19, 98 11:18:51 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >  "accept&read combined call is something else we're toying with. Very
> >  often we get a poll/select broken because there's data coming in on a
> >  socket, and most of the time there's already data in the socket
> >  buffers.  Being able to do the accept() and read() in a single call
> >  should be beneifital."

it is not very clear to me what the above means -- perhaps that in the
sequence

	select()
	accept()
	select()
	read()

the second select could be saved ? In that case, one could always write

	select()
	accept()
	if (fionread())
		read()

at the little price of one simple syscall, and not a full select with
its overhead for scanning all descriptors.

	cheers
	luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808201002.MAA26820>