Does anyone have experience using enet with a multiplayer game sending reliable packets ~20 times a second or more? I imagine most people sending that many packets are using unreliable.
On Sun, Nov 21, 2010 at 6:01 PM, Lee Salzman <[email protected]> wrote: > No, the point is to get all available packets in this frame and not stall, > i.e. it is polling. You wouldn't use a non-zero timeout in a game's client > loop like that. > > Lee > > On 11/21/2010 02:31 PM, Mark Palkow wrote: > > Couldn't the problem be > > while( enet_host_service (client, & event, 0) > 0 ) > > because it takes all the CPU (100%)? > shouldn't it be something like: > > while( enet_host_service (client, & event, 10) > 0 ) > > so that the CPU gets a chance to handle other task like the network stack? > regards Mark > > > > -----Ursprüngliche Nachricht----- > Von: [email protected] [mailto:[email protected]] > Im Auftrag von Chris Meub > Gesendet: Sonntag, 21. November 2010 08:39 > An: Discussion of the ENet library > Betreff: Re: [ENet-discuss] 4 seconds stalls.. congestion problem? > > I am doing this every 1/60th second: > > while( enet_host_service (client, & event, 0) > 0 ) > { > switch (event.type) > { > case ENET_EVENT_TYPE_RECEIVE: > // ( handle packet ) > enet_packet_destroy (event.packet); > break; > case ENET_EVENT_TYPE_DISCONNECT: // (handle disconnect here) > } > } > > As I understand it that will process all available events. > > On Sat, Nov 20, 2010 at 9:47 PM, Lee Salzman <[email protected]> wrote: > > > In the client, make sure you repeatedly call enet_host_service() until it > returns no events, otherwise it may possibly not service the network at > > > all > > > if it gets backlogged. > > Lee > > On 11/20/2010 07:41 PM, Chris Meub wrote: > > It does *not* exhibit the stalling behavior when I run on LAN or on > the same machine. > > On Sat, Nov 20, 2010 at 6:44 PM, Jay Sprenkle <[email protected]> wrote: > > > Have you tried running both on the same physical machine, or on two > > > machines > > > within your control? > Perhaps it's caused by comcast equipment. > > On Sat, Nov 20, 2010 at 6:52 PM, Chris Meub <[email protected]> wrote: > > > The server is hosted on a dedicated hosting provider M5, but I have > also tried putting the server on a friend's home Ubuntu server with > the exact same intermittent stalling behavior. > > The client is under a router and cable modem with comcast > > pinging the server averages 49ms at the moment, 32ms from another > network ive tested > > > > > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > > _______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
