On 2001.07.21, Mike Hoegeman <[EMAIL PROTECTED]> wrote:
> I was doing the above but it's a bit heavy handed don't you think?
> considering the data in question is usually less than 500 bytes.

If ns_tmpnam is generating a filename in /tmp, and your /tmp is
a mount in tmpfs and you have plenty of RAM, then going from
socket to file in tmp is actually quite fast -- I bet even some
platforms could do a readv() straight from socket fd to filesystem
fd without entering into userspace, or do some other kind of
mmap'ing deal.

Of course, now sucking the file back from the fs in /tmp into
your userspace application might suck, but again, if it's in
tmpfs, it'll be way fast.

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/

Reply via email to