4
operand
1y

Didn't know how difficult is to work with UDP protocol, doing local tests between two PCs in the same network it works well but, connecting to a public server over the internet has become a PITA, you have to do some shit like hole punching or UPnP(some routers but accoding to some users on the net is not reliable) or some others shit in order to connect it

And all that is because how NAT and UDP works, libs like libtorrent(C++) can connect using NAT-PMP, PCP and UPnP, but nothing in C# that can help with that, this is a game of pure guessing

Comments
  • 1
    Hmm, I might be mistaken but isn't that only the case when connecting from a server to a client behind a nat? The same problem exists with TCP.
  • 0
    Yes- it’s a horrible means of connection two systems when IT is not involved. I much prefer the knock and respond format, where something like HTTP/2 can open a stream connection for you.
  • 0
    P2P is very hard under IPv4, that's part of why so much software uses a client-server model even when the goal is to deliver information to a specific other client which is known to be online.
  • 0
    Usually if you need this kind of functionality you leverage something like STUN.

    There's public STUN servers you can use for these means.

    If you need more robust P2P, you can take a look at ICE and similars.
Add Comment