提高:: ASIO async_write结构复杂 [英] boost::asio async_write complex structure

查看:208
本文介绍了提高:: ASIO async_write结构复杂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我利用来发送一个复杂的结构的最好办法助推的ASIO async_write ...有什么建议?

Whats the best way to send a complex structure using boost's asio async_write... Any suggestions?

谢谢!

推荐答案

您需要序列化的结构,有些选项包括:

You'll need to serialize the structure, some options include

  • Boost.Serialization
  • Google Protocol Buffers

我已经使用Boost.Serialization与Boost.Asio的时候回答了类似的问题,<一个href=\"http://stackoverflow.com/questions/3182224/c-objects-serialization-for-linux/3183101#3183101\">here一个可能对你有用。

I've answered several similar questions when using Boost.Serialization with Boost.Asio, here is one that may be useful to you.

这篇关于提高:: ASIO async_write结构复杂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆