[ENet-discuss] channel confusion

Brad Monahan xbradx_00 at hotmail.com
Sat Jan 17 23:25:39 PST 2004


I'm trying to setup two channels for my game project; one for reliable, 
sequenced packets and one for unreliable, unsequenced packets since I don't 
want to have any stalling on the unreliable position update packets. I'm 
having troubles figuring out just how to setup multiple channels though. Up 
to this point I have just treated the update packets as reliable packets and 
sent everything over one channel, but I need a bit more performance now.

Let me know if this is how I should or shouldn't be setting things up:

On the client, I create a client host and then call enet_host_connect to 
connect to the server and allocate two channels. When I send a reliable 
packet, I call the enet_packet_create function with the 
ENET_PACKET_FLAG_RELIABLE flag specified to create the packet and then send 
it with a call to enet_peer_send with the channel paramater set to 0 (the 
channel I'm using for reliable transfers). When I send an unreliable packet, 
I call the enet_packet_create function with 0 as the flag and send it with a 
call to enet_peer_send with the chanel paramater set to 1 (the channel I'm 
using for unreliable transfers). This doesn't seem to be working however. It 
acts as though every packet is getting dropped or not sent at all, so 
obviously I'm doing something wrong. How should I be doing this?

Also, how should I being doing this from the servers point of view? Each 
time a client connects I should call enet_host_connect with the peers 
address and a 1 in the channel count paramater to allocate two channels?


Thanks.
-Brad

_________________________________________________________________
There are now three new levels of MSN Hotmail Extra Storage!  Learn more. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1



More information about the ENet-discuss mailing list