Can开发者_StackOverflow 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?
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 is amazingly good. So good that is the basis for networking in commercial engines like unity3d. http://www.jenkinssoftware.com
enet suits your needs
- simple
- fast
- reliable UDP
- intended for real time multiplayer games
It's not object-oriented though.
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.
精彩评论