C++多人游戏 UDP 套接字 API
谁能推荐一个易于使用、快速且可靠的 C++ API,用于通过 UDP 套接字发送和接收数据?也许是专门用于多人游戏的东西?
Can anyone recommend an easy to use, fast and reliable C++ API for sending and receiving data over a UDP socket? Maybe something that is specifcally intended for multiplayer games?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它不是专门用于游戏的,但如果您想真正开始并通过 UDP 实现您自己的协议,Boost.Asio 非常好。
It's not specifically for gaming, but if you want to get down to the metal and implement your own protocol over UDP, Boost.Asio is really nice.
Raknet 非常好。太好了,这是像 unity3d 这样的商业引擎联网的基础。 http://www.jenkinssoftware.com
Raknet is amazingly good. So good that is the basis for networking in commercial engines like unity3d. http://www.jenkinssoftware.com
enet 满足您的需求
但它不是面向对象的。
enet suits your needs
It's not object-oriented though.
您可能想查看此问题的答案:做什么当你需要可靠的UDP时你使用什么?。我为客户开发了 ENet 的 C++ 版本(具有 C API),他们将其用作游戏中间件产品的基础。
You might want to look at the answers to this question: What do you use when you need reliable UDP?. I developed a C++ version of ENet (which has a C API) for a client and they use it as the basis of their gaming middleware product.