简体   繁体   English

什么是C ++的高级网络库?

[英]What are some high level networking libraries for C++?

I'm completely new to networking as a whole and I have gotten completely lost every time I've tried to begin networking with various libraries (Boost::Asio was barely documented and terrible for beginners, Winsock is extremely low level, Raknet was near impossible to set up and only had 1 tutorial series on the whole library). 我对整个网络是完全陌生的,每次尝试与各种库进行网络连接时,我都完全迷路了(Boost :: Asio几乎没有文档记载,对初学者来说很糟糕,Winsock的级别很低,Raknet差不多了)无法设置,并且整个库只有1个教程系列)。 I'm looking for something high level that's easy to learn with and easy to manipulate. 我正在寻找易于学习且易于操作的高级知识。

My uses for the library will be for simple games. 我对图书馆的使用将用于简单的游戏。 I don't necessarily need something that's extremely diverse and flexible, just something that's suitable for my needs. 我不一定需要非常多样化和灵活的东西,而只需要满足我的需求的东西。 Cross-platform is desired but not necessary. 跨平台是理想的,但不是必需的。

I suggest using QtNetwork module of Qt. 我建议使用Qt的QtNetwork模块。 You possibly will find other Qt's features useful too. 您可能还会发现其他Qt功能也很有用。

Other than those named, I found enet to be rather nice to use and very easy to learn. 除了命名之外,我发现enet很好用,非常容易学习。 Or - depending on your needs - you could try the networking part of SFML or SDL ( SDL_net ), but these are bigger libraries offering more than just networking. 或者-根据您的需求-您可以尝试SFMLSDLSDL_net )的网络部分,但是这些是更大的库,提供的不仅仅是网络。 All three are rather nice regarding their license terms, but if you're bothering about these, I'd recommend enet or SFML. 这三个协议的许可条款都相当不错,但是如果您对这些协议感到困扰,我建议您使用enet或SFML。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM