How to prevent multiple simultaneous connections from the same client?

Bruno de Carvalho kindernade at gmail.com
Tue Nov 23 09:08:45 EST 2010


I’d advise you to implement some sort of authentication or
identification system so that only one instance of a given ID is
active on the server at any given time.

Something like…
- Client connects;
- Optionally server sends auth challenge  (or just sits and waits for
the client’s ID);
- Client sends ID (or authentication info);
- Server checks ID against online clients;
- Server either rejects connection(1) or accepts and sends the other
connection for the same ID down(2).

I'd go for 2 as the server might take some minutes to realize a
severed connection has been lost. OTOH, it's prone to ghosting
(someone else knowing your ID and taking you down repeatedly) unless
you do auth to go along with it.
Really depends on the kind of game you're doing.


Cheers,
  Bruno


On Mon, Nov 22, 2010 at 6:18 PM, Ersin ER <ersin.er at gmail.com> wrote:
> Hi all,
>
> We're developing a game server using Netty and I would like to get your
> advise on the following problem:
>
> How can I prevent multiple simultaneous connections from the same client
> using Netty at the server side?
>
> Any suggestions or references are welcome!
>
> Regards,
>
> --
> Ersin Er
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



More information about the netty-users mailing list