What is the advantage of using mutable buffer objects in boost ASIO over char arrays?

I am developing / developing a UDP server application and plan to use boost. What are mutable buffer objects and what is this standard char array?

+4
source share
2 answers

Use fixed-length buffers such as boost :: array when you know a priori how much data you expect to receive or send. ASIO streambufs allows you to receive an unknown amount of data. In particular, async_read_until requires the use of streambufs.

0
source

Have you read the asio buffer documentation ? It is quite comprehensive and describes very diverse and non-modifiable buffers.

-1
source

All Articles