Identifying different clients with same IP?
This is concerning my Reliable UDP code...
How would I go about identifying different clients with the same IP? For example, clients behind a router that have the same WAN IP? How do other games distinguish between clients?
I would like to avoid sending an ID number back and forth, since it will be that much more to send with the header. Is there any other way?
I have a feeling there isn''t...but just in case
Thanks,
Synth0id
There is no point in doing anything at all, you'll die pretty soon anyway.
At least the clients port must be differnent, if they share an IP, as far as I know.
I don''t think that''ll work realisitcally. It would require too much configuration on the side of the client.
Think of it in the context of a MMORPG. How does it specify users? I know of many situations where there are large populations of clients using...say Everquest...that have the same IP. Like in colleges for example, all the clients share the same IP i assume.
Any other ideas? or is the sending of an ID the way to go?
Think of it in the context of a MMORPG. How does it specify users? I know of many situations where there are large populations of clients using...say Everquest...that have the same IP. Like in colleges for example, all the clients share the same IP i assume.
Any other ideas? or is the sending of an ID the way to go?
There is no point in doing anything at all, you'll die pretty soon anyway.
I think you''ll have to have some sort of ID in any case. Otherwise, one player could hijack another player''s character by sending a fake IP.
But anyway, you should allow the clients to auto-chose their port by specifying 0 in the sin_port part of your SOCKADDR_IN structure anyway. Otherwise, you will run into problems with firewalls and NATted systems (as you are finding out), especially with UDP. This is something I discovered the hard way
But anyway, you should allow the clients to auto-chose their port by specifying 0 in the sin_port part of your SOCKADDR_IN structure anyway. Otherwise, you will run into problems with firewalls and NATted systems (as you are finding out), especially with UDP. This is something I discovered the hard way
Creation is an act of sheer will
October 19, 2003 08:57 AM
I''m using the ephemeral port to identify players in my current game and it work''s just fine, even behind nats. It''s guaranteed to be unique so why not threat it as such?
What they said.
Your game will recieve a packet that has the IP and Port in the header. When you initialize a user, make sure that the character they log in to is bound (for this session) to that IP and Port combination.
Then you pretty much don''t worry about it. You send messages back to the IP and Port combination and the client side splits the packets off to the proper destination.
Generally, no other code is included. That''s why if you check the documentation on pretty much any MMO out there, you will see the disclaimer that the product does not officially support Internet Connection Sharing. This means that they added no extra code in that would make them liable for customer support in this area. However, in most cases, you get this for free.
Cheers,
Webby
Your game will recieve a packet that has the IP and Port in the header. When you initialize a user, make sure that the character they log in to is bound (for this session) to that IP and Port combination.
Then you pretty much don''t worry about it. You send messages back to the IP and Port combination and the client side splits the packets off to the proper destination.
Generally, no other code is included. That''s why if you check the documentation on pretty much any MMO out there, you will see the disclaimer that the product does not officially support Internet Connection Sharing. This means that they added no extra code in that would make them liable for customer support in this area. However, in most cases, you get this for free.
Cheers,
Webby
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement