简体   繁体   中英

Is there any c++ tcp server on linux?

我想用c ++开发一个无阻塞的tcp服务器,是否有像Twisted这样的开源项目?

Boost.Asio is discussed quite frequently in the boost-asio tag on SO. Copying from the tag wiki that I wrote:

Most programs interact with the outside world in some way, whether it be via a file, a network, a serial cable, or the console. Sometimes, as is the case with networking, individual I/O operations can take a long time to complete. This poses particular challenges to application development. The Boost.Asio library is intended for programmers using C++ for systems programming, where access to operating system functionality such as networking is often require

Have a look at ZeroMQ which has several interfaces, including C++.

It does more that just a socket tcp server, but that is part of the appeal. It is licensed under the very liberal LGPL with optional commercial support.

Take a look at the ACE Toolkit. Especially the Reactor and event demultiplexing and event handler dispatching support. The license is very easy and is similar to the BSD License

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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