[ENet-discuss] Multiple enet_host_service instances?

GhostManZero ghostmanzero at lutherlink.de
Fri Aug 24 09:47:26 PDT 2007



   From what i know, Enet_host_service will "empty" the list of  
events, so if the connect thread gets the receive packet and just  
ignores it, it'll lose the packet, so you wont receive it on the other  
thread.

   Remember, even if threads appear to run all at the same time, they  
need to "pause" the program to sync, using mutexes or semaphores or  
stuff like that, so a thread being "run" will pause all other threads.

   (note to self: next time, use "reply to list" instead of reply so  
the msg will be sent to the list and not to the poster)

   Quoting Kamran Soomro <kamransoomro84 at gmail.com>:

> Hi,
>
> I was wondering if running multiple instances of enet_host_service on the
> same host, but looking for different events will create problems or not? I
> mean to say, that suppose I'm listening in one thread for an
> ENET_EVENT_TYPE_CONNECT, and in another for ENET_EVENT_TYPE_RECEIVE at the
> same time, same host. Now, suppose an ENET_EVENT_TYPE_RECEIVE is generated,
> but the active thread at that time is the one listening for CONNECT, and it
> receives the RECEIVE event, checks if it's a CONNECT event, and doesn't do
> anything. Now, when the RECEIVE thread runs, will it receive the RECEIVE
> event or not? Please let me know if I'm not clear. Thanks!
>
> --
> Regards,
> Kamran Soomro.
>

-- 
~Zero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20070824/0fae4016/attachment.htm 


More information about the ENet-discuss mailing list