[ENet-discuss] New client connected notify

Lee Salzman lsalzman at telerama.com
Sun Mar 28 15:22:58 PST 2004


My guess is: after you get a CONNECT event on the client side, you are
never servicing the host again until you send out a packet or disconnect.

To make the problem explicit, A connects to B by doing the following:

A sends CONNECT to B
B receives CONNECT ->
  B sends ACK:CONNECT to A
  B sends VERIFY_CONNECT to A
A receives VERIFY_CONNECT ->
  A delivers CONNECT event
  ** <- you are here!
  A sends ACK:VERIFY_CONNECT to B
B receives ACK:VERIFY_CONNECT ->
  B delivers CONNECT event

So, to make sure the ACK:VERIFY_CONNECT is getting sent out, either call
enet_host_flush() or enet_host_service() after you get the connect
event.

Lee

On Sun, Mar 28, 2004 at 11:54:44PM +0200, Marcin Zaj?czkowski wrote:
> Hi,
> 
> I adopt ENet library to use in my project and recently I found something 
> what suprised me. Namely, when some client is connecting to server, it 
> gets acknowledgement (by ENET_EVENT_TYPE_CONNECT) and it's ok. But I 
> notified that this event isn't generate on server side until client 
> sends some packet or just calls disconnect. It's litle confusing, 
> because I have to know how many clients is connected even I they don't 
> send any packets.
> Is it normal? I use recent CVS version.
> 
> Thanks for any reply
> Marcin "Szpak" Zaj?czkowski



More information about the ENet-discuss mailing list