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