[ENet-discuss] Preventing a host from connecting multiple times to another host?

Benoit Germain bgermain at ubisoft.fr
Thu Jun 17 05:16:57 PDT 2010


> -----Message d'origine-----
> De : enet-discuss-bounces at cubik.org [mailto:enet-discuss-
> bounces at cubik.org] De la part de Lee Salzman
> Envoyé : jeudi 17 juin 2010 13:00
> À : Discussion of the ENet library
> Objet : Re: [ENet-discuss] Preventing a host from connecting multiple
> times to another host?
> 
> The risks of doing that are in fact the behavior you are trying to
> cause: denying multiple connections from the same host and port.
> 
> There are perfectly legitimate cases where this can happen, such as an
> old connection from the same host/port that is a zombie or on its way
> to
> being a zombie due to a timeout, and a new one coming in that is trying
> to replace it. In this case you would still likely need the connectID,
> but some more coarse way of updating connectID, i.e. all 4 of your
> connect requests would have the same connectID, but if the connection
> later drops and needs to be reinitiated, the connectID needs to differ.
> 

Let's say I have hosts A and B. Host A has a zombie connection with B. I suppose that a new connection won't arrive in A unless I initiate it manually from B with enet_host_connect when I see that my current connection with A is lost. In that case, A's zombie connection will just prevent connections from B until it disappears, which will just cause an additional delay until B can reestablish its connection to A. Or can the zombie stay here indefinitely in A, thereby preventing all future connections from B?


More information about the ENet-discuss mailing list