httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike O'Leary" <>
Subject ap_rwrite
Date Tue, 27 May 2008 15:27:08 GMT

I am writing an Apache module using Apache 2.2.3 and, from what I
understand, the sockets are non-blocking.  My questions is about ap_rwrite
having the signature below:

AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);

Is it possible that ap_rwrite returns some value less than nbyte, but not
-1?  This would mean that I would need to loop, passing some byte offset
into buf and reducing nbyte until all of the content was sent.  If it is not
possible for ap_rwrite to return some value less than nbyte other than -1,
is there some internal mechanism that is looking to enforce a specific
transfer rate and will time out and return -1 from ap_rwrite if this rate is
not achieved?  If this is not the case, then aren't the sockets blocking?

Thanks in advance!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message