[ENet-discuss] Issue of lost event

Todd Huang huangtodd at hotmail.com
Sun Sep 2 23:53:15 PDT 2007


Hello:

    After setting the ENet communication between the client and server, we 
run into a problem
that the client couldn't receive the ENET_EVENT_TYPE_RECEIVE event after 
sometime. However,
the ENet communication still work successfully. That is, the ENet module on 
the client side
continuously acknowledges the packets received from the server side.

    The code used by the client side is written as the following:


    while (1)
    {
        if (enet_host_service(enetHost, &event, 30) > 0)
        {
            switch(event.type)
            {
                case ENET_EVENT_TYPE_CONNECT:
                       ----------------
                    break ;

                case ENET_EVENT_TYPE_DISCONNECT:
                        ---------------
                    break ;

                case ENET_EVENT_TYPE_RECEIVE:
                    send data to upper layer application ;
                    break ;

                default:
                    break ;
             }/* End of switch */
        }/* End of if event received */
    }/* End of while */


    Does any one have encountered the same problem before? Could anyone give 
us some advices
on how to solve or identify this problem?

    Thanks.

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/



More information about the ENet-discuss mailing list