ZeusWPI / MOZAIC

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition platform
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Non-local networking #228

Closed rien closed 6 years ago

rien commented 6 years ago

When we want to play games 'online' we need to be able to make connections trough NAT's. This will require us to implement something like TCP Hole Punching.

I have found an interesting Rust library for P2P connections (which uses this technique). This might be worth looking at.

iasoon commented 6 years ago

I am not too sure about all these things, but keep in mind that we don't exactly have a p2p situation, but an actual server with clients. I'm not sure how NAT hole punching will work there. If I understand correctly, the server should first send SYNs to the connecting clients, so that they can then initiate a connection to the server through NAT. This means that we would have to know the client ip's in advance, which we don't. Is that right?

iasoon commented 6 years ago

Ah! We should solve this by setting up a MOZAIC proxy server, which is now entirely possible with the new networking code! I'll create a separate issue.