httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: Extraneous socket read?
Date Fri, 27 Jul 2001 20:00:40 GMT
Bill Stoddard wrote:

>Are you still considering working on an APR_INCOMPLETE_READ/APR_OPTIMISTIC_READ socket
>option?  I think something like this will be useful to the lingering close code
>(ap_lingering_close).  During lingering close, we do a non-blocking read first which
>returns EAGAIN then do a select.  In this case, it is clearly a win to just do the select
>(since the common case will be that we have no bytes to read on the inbound side of the
>connection) and avoid the initial read altogether.
>I think I prefer the existing operation (read then select) for the default but would like
>a way to tell APR to do a select then a read for special cases like this.
I think the most general solution is to adopt Dean's APR_INCOMPLETE_READ
logic and let apps set the flag themselves for special cases like the first
read and the lingering close.  I'll try to post a patch this afternoon that
adds the first-read and lingering-close optimizations on top of Dean's code.


View raw message