mas-bandwidth / netcode

Secure client/server connections over UDP
BSD 3-Clause "New" or "Revised" License
2.43k stars 190 forks source link

Protocol questions #9

Closed jfrsmith closed 7 years ago

jfrsmith commented 7 years ago

I had a couple of questions about the protocol:

  1. How does it handle multiple clients behind a single IP address? The server protocol seems to ignore packets from a source address that it's already received a packet from, so this would suggest that it doesn't support this scenario.
  2. Do you have any ideas about how you'd implement parties? I.e. multiple clients wanting to connect to the same dedicated server? I'd imagine that you'd have to do a bulk request from either a party arbiter or a separate service, I'm assuming some kind of matchmaking service.

I like the sounds of the protocol, anyway! I'm interested in doing a full Rust implementation (I saw someone else has already jumped on that too :) ), so I'll see if I can bash away at it when I get some time.

Cheers, Jack

gafferongames commented 7 years ago
  1. It handles multiple clients behind and IP address with different ports. It only ignores packets if the IP:port combination matches an already connected client.

  2. No plan for parties right now, but I would suggest that you should be able to include information in the user data field of the connect token to describe the reservation within the existing 1.0 protocol.

Parties and reservations are a good extension for 1.1 that I'll consider. Thanks!

If you'd like to help out with the Rust implementation, all hands on deck, your help is welcome.

cheers

gafferongames commented 7 years ago

ps. When I said address in the standard I meant address + port... updated the standard so it specifically mentions address + port in all instances.