Is the enet library thread-safe?

On Aug 6, 2009, at 7:23 AM, "Peter Soxberger" <[email protected]> wrote:

enet_host_service() is called with a timeout of 2 milliseconds in a seperate 
thread. I also checked it with the debugger if it's still called.

Currently the problem appears like this: I have a Server and 2 clients. Client1 
sends packets to the server which forwards the packates to client2. Client2 
sends packets to the server which forwards them to client1. Every client has 
~200 fps and they send a packet every frame.

The result is always a bit different. Normally ~30 seconds pass until suddenly 
one of the clients doesn't receive packets anymore although the server is still 
forwarding them. The same client that receives no packates anymore can still 
send packates to the server. After some time the same happens on the second 
client and then (not always) the disconnected event is called on the clients.

Any idea how I should continue testing or what could cause such a problem?

Thanks!

Best regards,
Peter

-------- Original-Nachricht --------
Datum: Tue, 04 Aug 2009 06:53:45 -0700
Von: Lee Salzman <[email protected]>
An: Discussion of the ENet library <[email protected]>
Betreff: Re: [ENet-discuss] a lot of packets => disconnect

Are you remembering to service the hosts very frequently, regardless of 
whether or not something was sent?

Lee

Peter Soxberger wrote:
Hi!

I have the following problem: I have two clients connected with a
server. Both are sending small packets every frame. But after a random time, one
of the clients get's disconnected. If nothing is sent or not that often
none of them get's disconnected. Could it be that there is some kind of buffer
overflow that causes the disconnects?
I have no clue how to find out what causes this disconnects... Is there
some kind of possibility to find out why the connection was lost?

Thanks for your help!

Best regards,
Peter


_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

Reply via email to