Portable lightweight C++ sockets wrapper

前端 未结 9 2203
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 01:58

I really thought this would be easier to find...

I need a portable c++ sockets wrapper. I\'m planning to use it for a windows server application and a client that w

9条回答
  •  忘掉有多难
    2020-12-31 02:23

    Take a look at ENet http://enet.bespin.org/ it is very lightweight and portable and works on top of UDP, with optional support for reliable packets. It is easy to use, the API is low-level and with little performance overhead. You have a high degree of control over the memory management, which could be good if networking is a bottleneck for you and the malloc/new implementation you use performs badly under multithreading.

    It would not be that hard to implement your high level thread “optimally”, since there is optional support for blocking receive and the library is a “library” and not a framework therefore you are the decision maker instead of the library.

提交回复
热议问题