ENet does allocate some additional storage for each channel. I don't believe it's a lot though (depending on your definition of 'a lot'). I think you only really need the one channel.
The value of channels for me was you could have higher priority traffic routed through a specific channel and any further structure I imposed on the data being sent was handled outside the networking library. On Thu, Apr 8, 2010 at 6:32 AM, M. Rijks <[email protected]> wrote: > Hi all, > > Apologies for the slightly long precursor, but I feel I need to make the > issue clear. > > I am in the process of designing a networking library for a particular game > development system, and I am using ENet as the underlying 'protocol'. The > things I am building on top of it is a transparent and easy-to-use > interface, player management, session management and all that jazz. I also > wish to set up ENet-driven lobby server software which can host any game > that uses this library, as well as instructing hosts to punch holes for > connecting players. > > The goal is that the interface for connecting to a game is about as simple > as it was with DirectPlay: the end user / game developer need only one IP > address and optionally port number to connect to. The remote end can either > be a server for the game (the session) or it can be a lobby server. The > communication is entirely the same: a list of sessions can be received (just > one with a game server, many with a lobby server) and a session can be > joined (immediately when connected with a game server; automatically > connecting to the game server if the connection was a lobby server). Both > the end user and the game developer should be oblivious to how this happens, > as reconnections are handled by the library. > > I'm quite confident with the architecture I have set up, but I do have an > issue: It is up to the game developer to decide how many channels should be > opened for the game. And as far as I understood Enet, it is the client that > tells the host how many channels it wants to open. That's fine if clients > directly connect to a game server, but not when a client connects to the > lobby server. The lobby server doesn't need more than a single (guaranteed > delivery) channel for its purposes, but clients may instruct it to open up > to 255 channels. And since lobby servers can potentially service hundreds, > even thousands of clients, I assume that they will reserve a lot of > unnecessary resources. > > Is my understanding of channel allocation between client and host correct? > If so, is there any way to limit the number of channels used by a host? And > if so, what will happen if a badly written game sends data on a channel that > the lobby doesn't have? > > Thanks in advance for any response! > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > -- --- I couldn't have said it better myself: "Hitler and cloud computing" http://www.youtube.com/watch?v=VjfaCoA2sQk
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
