如何将 std::wstring 包装在 boost::asio::buffer 中?
我正在使用 boost::asio 编写客户端服务器应用程序。我想将结构从客户端传输到服务器。该结构中有一些 std::wstring。如何在 boost::asio::buffer 中对结构进行编码?
I am writing a client server application using boost::asio. I want to transfer a structure from a client to the server. The struct has a few std::wstrings in it. How do I encode the structure in boost::asio::buffer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常我使用 boost::asio::streambuf 来序列化结构。
Message.h
client.cpp
server.cpp
Typically I use
boost::asio::streambuf
for serializing structures.Message.h
client.cpp
server.cpp