I've always wondered this on my mind and I've had a hard time looking for papers or articles on how this is done exactly.
Take for example the game: GunZ:
In this game you can connect to a certain number of servers after you've logged in.
Once you're logged in, you're connected to the lobby where you can chat with other players
connected to the main server.
However, you can also create your own "rooms" and "host" your own game for others to play on.
Now it's not 100% for sure that anyone here may know how exactly GunZ does it, but does anyone have an idea
on how this actually works?
When a player hosts a room, and someone wishes to join your room, are other people connecting to that player?
But that player hasn't even port forwarded and they're managing to connect to him anyways, are they using some sort of
UDP holepunch / NAT traversal?
Are players technically actually hosting their own servers for other players to connect to? Because if that's the case isn't this a huge security risk since they can simply just edit memory on their server?
If they aren't indeed hosting their own servers (rooms), then does that mean every single room on the server is being emulated through the main server? Meaning when you connect to a players room, you're still actually sending datagrams/packets to the main server?