[ENet-discuss] channel confusion

Brad Monahan xbradx_00 at hotmail.com
Sun Jan 18 14:48:49 PST 2004


Yes I am. That's why I'm thinking it's something with the way I have things 
setup for the channels. Does what I explained seem to be what I should be 
doing then?

-Brad



>From: Lee Salzman <lsalzman at telerama.com>
>Reply-To: Discussion of the ENet library <enet-discuss at cubik.org>
>To: Discussion of the ENet library <enet-discuss at cubik.org>
>Subject: Re: [ENet-discuss] channel confusion
>Date: Sun, 18 Jan 2004 10:41:25 -0500
>
>The only time I can think of packets getting dropped like that are if
>there is no actual connection or the connection is still setting up. Are
>you calling enet_host_service() and waiting for the connect event to
>happen before sending stuff out?
>
>Lee
>
>On Sun, Jan 18, 2004 at 07:25:39AM +0000, Brad Monahan wrote:
> > 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
> >
>
>_______________________________________________
>ENet-discuss mailing list
>ENet-discuss at cubik.org
>http://lists.cubik.org/mailman/listinfo/enet-discuss

_________________________________________________________________
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