[ENet-discuss] Disconnection problem

Benoit Germain bgermain at ubisoft.fr
Wed Dec 22 23:52:36 PST 2004


> -----Message d'origine-----
> De : enet-discuss-bounces at cubik.org 
> [mailto:enet-discuss-bounces at cubik.org] De la part de Adam D. Moss
> Envoyé : mercredi 22 décembre 2004 19:31
> À : Discussion of the ENet library
> Objet : Re: [ENet-discuss] Disconnection problem
> 
> Benoit Germain wrote:
> > Imagine that I have a client that attempts to connect to an 
> inexistent 
> > server. The client's peer will enter CONNECTING state for 
> some time. 
> > If nothing is done, connection fails by timeout, a 
> DISCONNECT event is 
> > triggered, and the peer is reset.
> > 
> > Now, if the client calls enet_peer_disconnect(), a disconnection 
> > command is issued toward the absent server, the peer is 
> reset, but no 
> > disconnection event is ever sent, since the peer can't 
> remember that 
> > anything ever happened.
> 
> I don't know if this is what's intended, but (if I understand 
> you right) ENet's behaviour is what I'd expect.  i.e. I 
> wouldn't expect to see a(nother) DISCONNECT event for a peer 
> that wasn't actually connected.
> 

Sorry, I wasn't clear enough. The exact sequence is:

Imagine that I have a peer that attempts to connect to an inexistent server.
The client's peer will enter CONNECTING state for some time. 
If at at point, the client calls enet_peer_disconnect(), a disconnection
command is issued toward the absent server, the peer is reset,
but no disconnection event is ever triggered, since the peer can't remember
that anything happened.

Also, when a CONNECTING peer times out, you will get a DISCONNECTED event
and the peer will be reset. I would expect the same behaviour if
I issue a disconnection request before the timeout occurs.

Regards,


__________________________________
Benoit Germain
][ Engineer
+33 4 50 10 93 56
mailto:bgermain at ubisoft.fr
__________________________________


More information about the ENet-discuss mailing list