apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: [patch] sendfile on win32 slow (bug #20382)
Date Fri, 05 Sep 2003 02:35:16 GMT
At 01:28 PM 9/2/2003, Maarten Bekers wrote:
>To prevent an DoS, perhaps  WaitForSingleObject() could be called in a loop
>with, check the value of GetOverLappedResult() for a 'sane' value (this can
>be the old MAX_SEGMENT_SIZE), and if the amount of bytes transmitted since
>the last call to GetOverlappedResult() is smaller than MAX_SEGMENT_SIZE,
>abort the loop and fall out of the sendfile() as the user is not receiving
>(quickly) enough.

I was under the impression that until an overlapped operation COMPLETES,
GetOverlappedResult doesn't give us anything useful in return other than
ERROR_IO_PENDING.  Was I misunderstanding the semantics?


View raw message