使用 boost::asio::async_write 时数据混乱
当我使用 boost::asio::async_write 发送一些大数据时,我发现收到的数据很乱,但总大小是正确的。两组数据似乎有重叠。我该怎么做才能避免这种情况发生?
when I was using boost::asio::async_write to send some large data, I found the data I received was messed up, but total size was correct. it seemed like two groups of data overlapped. What can I do to avoid this happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有代码,那就是在黑暗中刺伤。
async_read 直到上一次读取完成,
async_write
也是如此谁知道...
Without code, it's a stab in the dark..
async_read
until the previous read completes and same forasync_write
who knows...