Note that there are some explanatory texts on larger screens.

plurals
  1. POTCP/UDP Hole Punching and Hybrid P2P + Client/Server Architecture
    primarykey
    data
    text
    <p>I have a hybrid architecture where A is a client trying to request content from B, which is a server that is potentially behind a NAT (though not necessarily). S is a server acting as the go between for A and B to use hole punching in the following manner:</p> <p>A contacts S and says I want to get something from B. S gives A B's last known IP address and port, and A starts trying to contact B. At the same time, S gives B A's IP address and port, and B starts trying to contact A.</p> <p>S will <strong>NOT</strong> act as a relay server; after connecting with each other, all communication will take place in a direct connection between A and B. If they are unable to connect directly the connection will fail. I have this problem with both UDP and TCP.</p> <p>My question is, what is the most efficient way for keeping S up to date with B's IP address and port, so that any number of As can connect to B at any time. I'd also like the solution to be able to handle a situation where if the NAT that B is behind messes around with the ports (such as incrementing them by 1), I would be able to "guesstimate" as to what the port actually is.</p> <p>The solution I have thought of (but I'm not completely satisfied with):</p> <p>Update S with B's IP address and port by sending a request from B to S every X seconds. My issue with this is that if X is too high, S will not have the proper information for B, and if it is too low it would impose overhead on both B and S. I suspect this will end up being the final answer, and that the trick is going to be to find the proper value for X.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload