[ENet-discuss] allocating lots of channels

Ruud van Gaal ruud at racer.nl
Mon Aug 18 04:49:54 PDT 2008


You'd be using channels out of context to save a single char.
Channels are meant to differentiate types of packets that need a certain
ordering. For example, character health updates and chat messages. Both need
to get there reliably, but a health update doesn't need to wait for the
latest chat message to be there. So you'd use 2 channels to make this more
efficient.
I would think adding the extra 'id' char is faster than letting ENet handle
the sorting/queueing for the extra channels.

Cheers,
Ruud

> From: "ingmar wirths" <ingmania at googlemail.com>
> Subject: [ENet-discuss] allocating lots of channels
> To: "Discussion of the ENet library" <enet-discuss at cubik.org>
> Message-ID:
> 	<6caecef30808170423o370b94ecsdb4a97eb1967a0c4 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hello,
> 
> i was wondering if allocating lots of channels would decrease 
> ENets performence.
> 
> My background is: I want to send messages of different types. 
> My approach so far was to prefix every message with some 
> char, indicating the type of the message. This limits the 
> number of different types to 256, of course, but that should 
> be enough.
> 
> Now i was thinking of just having a channel for every message type.
> Are channels meant
> to be used this way? I probably need up to 30 or maybe 50 
> channels, if i'd do it this way.
> 
> So basically my question is, what is more efficient: to 
> prefix my messages with some char, or to use lots of channels?
> 
> Cheers
> ingmar



More information about the ENet-discuss mailing list