[ENet-discuss] Using ENet in multithread application
Marcin Zajączkowski
mszpak at wp.pl
Sat Dec 4 07:01:02 PST 2004
Hi,
I know ENet for some time and I used it for some purposes, but recently
I came across task to adopt ENet for multithread application.
With current ENet version I think I could do this using one thread to
call enet_host_service() which create new thread on connect and pass on
data on receive new packet and another threads (created by main thread)
which respond on that data and if needed send reply by call
enet_peer_send() (every thread can call it if needed).
Unfortunately this makes few problems. Maybe there is another solution
to do this?
I read in message from October 2003 that there are plans for making ENet
more thread supporting. Is there any guidelines for this?
In my opinion ability to call enet_host_service(peer/socket) (or
something similar) by thread to wait only for messages (packets) concern
only detailed socket would be very usefull. In that mode (normal mode
should be also available during network initialize) main thread (e.g.
enet_host_service(manage_events) ) would be only reliable for control
messages and create/remove other threads which would wait for data only
meant for them.
Regards
Marcin
More information about the ENet-discuss
mailing list