36

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.

abergmeier
  • 13,224
  • 13
  • 64
  • 120
  • 4
    What do you mean by P2P networking? What kind of communication do you want to achieve? Is this file transfer, chat, voice, video? Is this point to point or point to multi-point communication? – Zuljin Jun 11 '12 at 14:38
  • From my experience I can at least tell everyone to stay away from _enet_, since it is quite buggy. – abergmeier Sep 20 '12 at 09:57
  • 2
    ProudNet also provide P2P networking including hole punching and relaying. Features include remote procedure call, UDP-like and TCP-like messaging, encryption, compression, etc. – Hyunjik Bae Nov 21 '15 at 12:41

5 Answers5

25

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.

secmask
  • 7,649
  • 5
  • 35
  • 52
10

libnice - Implements ICE protocol.

selbie
  • 100,020
  • 15
  • 103
  • 173
4

One possible option is our MsgConnect product. Open-source license is available.

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121
  • 1
    software that doesn't have an open source GitHub repo nowadays starts to feel a bit like not software at all, in a way :) – Erik Kaplun Mar 10 '16 at 08:49
2

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.

wolfgang
  • 7,281
  • 12
  • 44
  • 72
0

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

Sdra
  • 2,297
  • 17
  • 30