[ENet-discuss] SPAML: ENet and multiple clients

Thomas Johansson thomas at paradoxplaza.com
Mon Oct 8 01:05:59 PDT 2007


I had a similar problem. It tried some hints that were previously posted on
this list with good effect. Ill paste a copy of the mail that I found on
this list.

//Thomas

/***** Old message below...
Thanx Lee for chiming in.

Two things seem to have greatly improved on my side:

- I set the Max window size to 4KB instead of the
orginial 32K. I think this is what was causing most of
the starvation.

- In enet_protocol_check_timeouts() now uses '+=
peer->roundTripTimeVariance;' instead of '*=2;' as
follows (to give more time to the peers to adjust):

//outgoingCommand -> roundTripTimeout *= 2;
outgoingCommand -> roundTripTimeout +=
peer->roundTripTimeVariance;

- Also, I had already changed the SO_SNDBUF socket
option to be the same as the receive buffer size.

Now, I am able to stream packets of 512KB with 20
peers simultaneously, whereas 3 peers would show
starvation and disconnect two after a few seconds. [I
am using one client on a Business Yahoo DSL, and one
server on our T1].

I still have two small issues I am investigating. For
some reasons, sometimes a peer seem to be stuck on a
command and send it indifinitely. It appears as it
still processes other messages, but it will continue
sending this command nevertheless (happens when you
connect 200 peers to the server. All with be connected
on both sides, but some peers on the client will still
send CONNECT cmds in a loop!?!).

Also, it appears that when I was testing 250
connections (no packet transfered - idle connections),
from one client to a server, all the pings where
occuring at the same time, even though the connections
were progressively made over a period a 20 seconds or
so. Note: I had to change the PING_INTERVAL to 5000
btw.

Anyways, thanx again Lee for this great library, and i
hope my findings may help some people.
/*****
----- Original Message ----- 
From: "GhostManZero" <ghostmanzero at lutherlink.de>
To: <enet-discuss at cubik.org>
Sent: Saturday, October 06, 2007 12:16 AM
Subject: SPAML: [ENet-discuss] ENet and multiple clients


I've been having quite a bad problem with ENet, depending on the
ammount of data i send to myself (summoning multiple client programs
to connect to a server program and constantly sending messages to the
server), after awhile my server program simple freezes and all clients
may even get disconnection events (its not certain).

I'd like to know what could cause such behaviour, besides my own
programming. I'm using ENet 1.1 on a C++ program.

-- 
~Zero

_______________________________________________
ENet-discuss mailing list
ENet-discuss at cubik.org
http://lists.cubik.org/mailman/listinfo/enet-discuss





More information about the ENet-discuss mailing list