[ENet-discuss] wake-up enet service

Ruud van Gaal ruud at racer.nl
Thu Aug 2 01:13:44 PDT 2012


I'd always use timeout=0, except for really simple apps perhaps.
As for waking up threads then, it's just standard OS things (not related to
ENet); check out semaphores and waitable objects.

Cheers,
Ruud

On Thu, Aug 2, 2012 at 8:58 AM, Jack Applegame <japplegame at gmail.com> wrote:

> Hello!
>
> I use separate thread for calling enet_host_service() with 1 second
> timeout.
> Is there a way to wake-up ENet from other thread, if It is necessary to
> send a packet immediately without waiting for timeout?
> Setting timeout to zero isn't good way, because in this case service
> thread fully loads one processor core even if it is no network activity.
>
> Best regards
> Jack Applegame
> ______________________________**_________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/**mailman/listinfo/enet-discuss<http://lists.cubik.org/mailman/listinfo/enet-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20120802/4520aa89/attachment.html>


More information about the ENet-discuss mailing list