In article <20000427094203.A455@linuxpower.org> you wrote:
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: quoted-printable
> Please CC any replies to email@example.com. I can't cope with the traffic =
> linux-kernel. Thanks.
> I'm writing a network server. Very simply put it reads requests from a sock=
> and replies with the contents of some local file that the client requested.
> Currently I mmap the files and then feed it to the socket when select(2)
> says it is ready for writing. If another request comes in for the same file
> then file the file is already mmap'ed and it's just sent.
This would be a very good case for the "sendfile" system call. It lets the
kernel handle all this stuff, without the need for the kind of tricks you
Arjan van de Ven
[*] I think sendfile() currently is blocking, but a first look at it
suggests that this is fixable with a five-line patch.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:12 EST