Boost.Asio async_send question

后端 未结 7 1943
半阙折子戏
半阙折子戏 2021-01-05 14:14

I\'m using Boost.Asio for a server application that I\'m writing.

async_send requires the caller to keep ownership of the data that is being sent until

7条回答
  •  广开言路
    2021-01-05 14:58

    You will need one write buffer per connection, others have been saying to use a vector per connection as was your original idea, but I would recommend for simplicity to use a vector of strings with your new approach.

    Boost.ASIO has some special cases built around using strings with its buffers for writes, which make them easier to work with.

    Just a thought.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题