|
Boost Users : |
Subject: Re: [Boost-users] [asio] Receiving data larger than buffer.
From: Igor R (boost.lists_at_[hidden])
Date: 2009-11-11 08:33:36
> however, is there a way to distinguish the case when I receive exactly
> buffer size amounts of data, and when the case when there's more left
> to complete the transfer?
You can use socket::available()
http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/reference/basic_stream_socket/available.html
> How does asio handle transfer of really large buffers? Will it
> dispatch it client side in receive buffer sized chunks as it enters,
> or will it wait for the entire payload to enter some internal buffer
> before dispatching?
IIRC, the current implementation of ASIO (at least in windows) just
supplies your buffer(s) to the OS API that performs the actual i/o, so
no additional copying occurs.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net