httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Zedlewski <zedlw...@Princeton.EDU>
Subject [PATCH] ap_sendfile try #1
Date Fri, 12 Nov 1999 09:46:34 GMT
Well, here's an initial look at an implementation for ap_sendfile in the Unix
APR.  I work on Linux, but I also wrote (untested) versions for the HP-UX and
FreeBSD APIs so I could see how different they'd be.  Currently, the three
OS-specific versions are completely separate.  What will be the neatest way to
format these eventually?  AIX is quite weird, but it does fit with the interface
described above and I can give a crack at it some time soon if this format turns
out to be acceptable.
ap_sendfile( ) should, as I think Manoj pointed out, work just like read or
write: it might not do a full write, but it stores the number of bytes written in
*len.  It would fail to write the complete number if (a) It's used on a
non-blocking socket, or (b) it's interrupted by a signal.
This stuff is REALLY platform-specific, but at least it's all going to be stuck
in APR instead of trailing throughout the main code.  I suspect there will be
some issues/objections with this code, so I didn't make the necessary changes to
get http_core to use the new API or to change the Win32 interface.  I can do that
when/if a final version is decided upon.
Thanks!
--JRZ


Mime
View raw message