[ENet-discuss] Multiple enet_host_service instances?
Kamran Soomro
kamransoomro84 at gmail.com
Fri Aug 24 10:31:34 PDT 2007
I thought so :). Thanks for the reply.
On 8/24/07, GhostManZero <ghostmanzero at lutherlink.de> wrote:
>
> 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
>
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
--
Regards,
Kamran Soomro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20070824/b4685707/attachment.htm
More information about the ENet-discuss
mailing list