[ENet-discuss] Channel count at server
Daniel Aquino
mr.danielaquino at gmail.com
Tue Jun 23 20:02:11 PDT 2009
i think when a client connects you can see how many channels they
allocated in their peer stucture... if they don't follow your rules
then they aren't written by you or aren't friendly so just drop
them... or just leave it up to them...
look into how enet initializes it's not very complex code... you can
clearly see that the number of channels is used to allocate space for
the list of channels (or other things)... So it's really just a way
to limit the amount of memory used if you know you only want 1
cahnnel.. then there is no reason to allocate space for 255 channel
structs (or whatever it creates)...
Are your end users going to run servers ? They should be technical
enough to simply forward a port so I don't see why STUN and nat
punching or anything would be needed... unless you want players to
directly connect to each other in a mesh...
On Tue, Jun 23, 2009 at 3:53 PM, M. Rijks<enet at forge.dds.nl> wrote:
> Hi everyone,
>
> Another query which I hope someone can shed some light on.
>
> My client library (which I intend to use for more than one game) connects
> either to a game server or a kind of lobby server that also acts as a STUN
> server, helping clients connect to game servers. To make things easier for
> end users, they will always connect to an IP not knowing whether it's the
> (STUN) lobby server or the game server - they retrieve a list of sessions
> (more than one in the case of a lobby, just one in the case of a game
> server) and when they select a session to join they are redirected to the
> game server (if it turns out they're on a lobby server and not on a game
> server).
>
> What I'm slightly concerned with is that in Enet, it seems that the client
> decides how many channels are used for communication. That's unfortunate
> because I'd like the client to always use a very large number (let's say all
> 255) of channels when connecting to a a game server, but for the lobby
> server it would need just one channel as there isn't much data to pass and
> it's all in one reliable sequence. Both clients and servers connect to the
> lobby server, and clients would only be connected for a short while however
> a lobby server could potentially serve as many clients as it can hold
> connections - and each connected client would occupy 255 channels...
>
> My questions are:
>
> 1. Am I correct to assume that the connecting client choses the amount of
> channels to open? The interface seems to confirm this.
> 2. If so, what are the repercussions performance-wise and memory-wise, how
> does this escalate?
> 3. Is there any way to make sure the lobby server 'sticks' to the single
> dedicated channel?
>
> Any help appreciated, thanks!
>
>
> _______________________________________________
> 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