Discussion:
[asio-users] socket.send_to(vector<> ) max_buffers
Apostolos Manolitzas
2013-10-30 07:34:15 UTC
Permalink
Hello all,

after several hours of debugging I figured out that by using the

|template||<||
||typename|| ||ConstBufferSequence <http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/reference/ConstBufferSequence.html>||>||
||std||::||size_t|| ||send_to||(||
||const|| ||ConstBufferSequence|| ||&|| ||buffers||,||
||const|| ||endpoint_type|| ||&|| ||destination||);||
|


there is some limitation in the size of buffers, by max_buffers. After
that the packets are ignored.
Should the library throw some error? Or at least try to send the packets
in chunks of max_buffers?


thanks all for your efforts supporting this very useful library.

-Apostolos
Marat Abrarov
2013-10-30 08:20:31 UTC
Permalink
Post by Apostolos Manolitzas
there is some limitation in the size of buffers, by max_buffers. After
that the packets are ignored.

http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/overview/implementa
tion.html

To the Asio maintainers:
But it will be better to put a reference to this part (with some kind of
warning) at description of buffers concept (in
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/overview/core/buffe
rs.html). Let's make Asio documentation better. Some of its really
meaningful parts are located too deep.
Post by Apostolos Manolitzas
Should the library throw some error? Or at least try to send the packets
in chunks of max_buffers?

To the Asio maintainers:
The runtime check for debug mode would be useful. It could ever become a
part of the "Buffer Debugging"
(http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/overview/core/buff
ers.html#boost_asio.overview.core.buffers.buffer_debugging).

Regards,
Marat Abrarov.

Loading...