[ENet-discuss] Disconnection problem

Adam D. Moss adam at gimp.org
Thu Dec 23 02:03:42 PST 2004


Benoit Germain wrote:
> 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.

Ah, I see.
Well, I can see the attraction in having it either way, but do
lean towards your way of seeing it.  Perhaps a FAILEDCONNECT
event would make sense, to save the client having to do too
much 'did I connect at all yet?' book-keeping to distinguish
between a genuine diconnection event and a failure-to-connect
event.

Regards,
--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3
"... so make sure your illness is early in the financial year."


More information about the ENet-discuss mailing list