问题
Is there any good cross-platform C++ library for P2P networking (preferably UDP but TCP would work also). Originally I planned to use libjingle but since they do not provide any precompiled libraries and sport a quite messy build system I currently set it aside as too complicated.
回答1:
libtorrent.org build on top of boost, boost-asio is a library for P2P work good for me. It implement BitTorrent protocol, using TCP for transport data, TCP/UDP for peer exchange.
回答2:
libnice - Implements ICE protocol.
回答3:
One possible option is our MsgConnect product. Open-source license is available.
回答4:
libjingle can be a pain to compile,but it's very powerful and the api is pretty straight forward, the sample applications help you learn and understand it better.
回答5:
Tribler.org:
it a cross-platform p2p client but it offer its open source API as well. It implements many non standard features like P2P video streaming, DHT, Merkle Hashes, repex, NAT and firewall puncturing, ...
Its engine is part of an European-founded video streaming project: p2p-next.
Unfortunately it's written in python, but you can wrap it in c++ or even generate c++ libraries out of python.
Alternatively: libswift
来源:https://stackoverflow.com/questions/10982062/p2p-library-for-c