需要在局域网网络上发送std::string
C++ Need to send std::string over a LAN network
我需要能够通过局域网网络发送std::字符串。就我而言,我有一台mac和一台PC,我希望它们能够进行交流。我已经在网上看了一下,但在解决我的情况方面没有多少幸运。我可以通过c++建立一个网络,让这些计算机可以共享文本,你知道吗?
boost asio库为通过套接字进行网络通信提供了一个健壮的框架。使用c++ 11的例子可以在这里找到:http://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/examples/cpp11_examples.html
您可能对聊天客户端/服务器示例特别感兴趣。
相关文章:
- cppcheck在const std::string[]上引发警告
- 将std::string传递给WriteConsole API
- 为std::string的某个索引赋值
- 使用 std::string () const 函数启动线程或未来
- 当我们进行一些操作时,应该使用什么'std::string'或'std::stringstream'?
- 如何更改大小(std::string)
- std::string 的对象真的可以移动吗?
- SegFault 同时使用 std::string::operator+= 和函数作为参数
- 无法从 std::string 中提取C++ Unicode 符号
- std::string 构造函数如何处理固定大小的 char[]?
- 真的没有来自 std::string_view 的 std::string 的显式构造函数吗?
- 将C++ std::string 转换为 UTF-16-LE 编码的字符串
- 重载 + 自己的类和 std::string 的运算符
- 如何使用 std::string 作为 QHash 的键?
- 将日语 wstring 转换为 std::string
- 可以从std::string继承以提供类型一致性吗
- 构造函数采用std::string_view与std::string并移动
- 在共享缓冲区内存中创建 ::std::string 对象
- std::string.size() 未知行为
- Valgrind 在 std::string::swap 中报告 SIGILL