If multiple threads have the same file open, and would
like to send portions of it back to the clients,
Ns_ConnReturnOpenFd() is close to being useful, but it
fails because a seek() must be done before before
calling the API. Also, the documentation incorrectly
states that the full file will be sent, ignoring the
length parameter.
A version that ultimately uses pread() instead of
read() would be useful in this case, but I suppose it
doesn't fit the FILE * paradigm. I don't know about
Tcl channels, so I can't say whether it makes from
that perspective.
For now, I'm working around this by reading the
portion of the file into a buffer on the stack and
doing Ns_ConnReturnData().
Would it be worth while to append an offset parameter
just for the FD case?
Fred
____________________________________________________
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.