Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Establish Peer to Peer over Internet



  • Re: Peer to Peer Connection

    Hey, it is said in the last reply from the above topic link:
    "The only challenge you face, is to come up with a system to establish that first connection. I have used UPD broadcast messages for that in the past, but a better solution is of course to use something like Zeroconf for service registration and discovery."

    It's OK for me to implement P2P in a local environment, since I could just scan the network (I'm sure there is a better solution for that);
    but my real concern is how am I supposed to connect to a first peer in the Internet without knowing its address, definitely I would not try to scan the whole Internet! haha

    @andre mentions zeroconf and UDP broadcast messages.; how is that? is there any better solution today? (the referenced topic is 7 years old).


  • Lifetime Qt Champion

    @LuckyScooby

    you need a central server where all clients register themselves. then you can hand over the connection so two clients are directly connected. this also solves the problem with NAT routers, because your clients would be invisible behind them otherwise.



  • @aha_1980
    So peer-to-peer is not decentralized at all.
    I thought of Microsoft's PNRP, but: it is also semi-decentralized (and platform specific).

    So in torrent "language", these servers are trackers, right? Right.. but then Wikipedia states:
    "Since the creation of the distributed hash table (DHT) method for "Trackerless" torrents, BitTorrent trackers have largely become redundant."

    I'd better research more about DHT.


Log in to reply