cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl and async I/O

From: Jamie Lokier <jamie_at_shareable.org>
Date: Tue, 19 Aug 2008 18:50:31 +0100

Cory Nelson wrote:
> > And neither method is optimal!
> >
> > Ideally, you don't want to commit 10000 large receive buffers in
> > overlapped reads which may take a long time to receive anything. You
> > want to allocate buffers from a smaller pool as data becomes
> > available. For writes, similar but less clear cut.
>
> Windows allows you to perform a WSARecv() with a null pointer. It
> lowers your overall throughput, but it does let you minimize the
> amount of locked pages which can be useful on 32-bit.

Thank you, that's very interesting!

I've just re-read the WSARecv() documentation :

http://msdn.microsoft.com/en-us/library/ms741688(VS.85).aspx

    http://msdn.microsoft.com/en-us/library/ms741542(VS.85).aspx

and I don't see this anywhere. Can you point me at something which
describes this feature and exactly what it does (and if it's and
extension specific to certain types of socket provider) - or where I
missed it in the documentation?

Does WSASend() support similar for writes - so that you can use these
operations with null buffers as another way to build an epoll-style
event collector?

Thanks again,
-- Jamie
Received on 2008-08-19