开发者

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

I'm designing/developing a UDP server application and plan to use boost. What are the mutable buffer objec开发者_Python百科ts for and what advantage is it over an standard char array?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜