Inheritance: NFBehaviour
Ejemplo n.º 1
0
 public void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     foreach (NFINet.OnSocketEvent handler in mxEventHandlerList)
     {
         handler(nSockIndex, eEvent, pNet);
     }
 }
Ejemplo n.º 2
0
 public void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     foreach(NFINet.OnSocketEvent handler in mxEventHandlerList)
     {
         handler(nSockIndex, eEvent, pNet);
     }
 }
Ejemplo n.º 3
0
        public void RegisterPackCallback(int nMsgdID, NFINet.OnRecivePack xEventHandler)
        {
            List<NFINet.OnRecivePack> xList;
            if(!mxPackHandlerDic.TryGetValue(nMsgdID, out xList))
            {
                xList = new List<NFINet.OnRecivePack>();
            }

            xList.Add(xEventHandler);
        }
Ejemplo n.º 4
0
 public void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
 {
     List<NFINet.OnRecivePack> xList;
     if(mxPackHandlerDic.TryGetValue(nMsgID, out xList))
     {
         foreach (NFINet.OnRecivePack handler in xList)
         {
             handler(nSockIndex, nMsgID, msg, pNet);
         }
     }
     else if(mxPackHandlerDic.TryGetValue(-1, out xList))
     {
         foreach (NFINet.OnRecivePack handler in xList)
         {
             handler(nSockIndex, nMsgID, msg, pNet);
         }
     }
 }
Ejemplo n.º 5
0
        protected void OnNetRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
        {
            switch ((NFMsg.EGameMsgID)nMsgID)
            {
            case NFMsg.EGameMsgID.EGMI_STS_HEART_BEAT:
                break;

            case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REGISTERED:
                OnWorldRegisteredProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_MTL_WORLD_UNREGISTERED:
                OnWorldUnRegisteredProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REFRESH:
                OnRefreshWorldInfoProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REGISTERED:
                OnLoginRegisteredProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_UNREGISTERED:
                OnLoginUnRegisteredProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REFRESH:
                OnRefreshLoginInfoProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_REQ_CONNECT_WORLD:
                OnSelectWorldProcess(nSockIndex, nMsgID, msg);
                break;

            case NFMsg.EGameMsgID.EGMI_ACK_CONNECT_WORLD:
                OnSelectServerResultProcess(nSockIndex, nMsgID, msg);
                break;

            default:
                break;
            }
        }
Ejemplo n.º 6
0
        public void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
        {
            List <NFINet.OnRecivePack> xList;

            if (mxPackHandlerDic.TryGetValue(nMsgID, out xList))
            {
                foreach (NFINet.OnRecivePack handler in xList)
                {
                    handler(nSockIndex, nMsgID, msg, pNet);
                }
            }
            else if (mxPackHandlerDic.TryGetValue(-1, out xList))
            {
                foreach (NFINet.OnRecivePack handler in xList)
                {
                    handler(nSockIndex, nMsgID, msg, pNet);
                }
            }
        }
Ejemplo n.º 7
0
 private void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
 {
     GetNetHandler().OnRecivePack(nSockIndex, nMsgID, msg, pNet);
 }
Ejemplo n.º 8
0
 private void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     GetNetHandler().OnSocketEvent(nSockIndex, eEvent, pNet);
 }
Ejemplo n.º 9
0
        //////////////////////////////////////////////////////////////////////////

        protected void OnNetSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
        {
            switch (eEvent)
            {
            case NFINet.NF_NET_EVENT.NF_NET_EVENT_CONNECTED:
            {
                //OnClientDisconnect(nSockIndex);
            }
            break;

            default:
            {
                //OnClientConnected(nSockIndex);
            }
            break;
            }
        }
Ejemplo n.º 10
0
        protected void OnNetRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
        {
            switch ((NFMsg.EGameMsgID)nMsgID)
            {
                case NFMsg.EGameMsgID.EGMI_STS_HEART_BEAT:
                    break;
                case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REGISTERED:
                    OnWorldRegisteredProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_MTL_WORLD_UNREGISTERED:
                    OnWorldUnRegisteredProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REFRESH:
                    OnRefreshWorldInfoProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REGISTERED:
                    OnLoginRegisteredProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_UNREGISTERED:
                    OnLoginUnRegisteredProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REFRESH:
                    OnRefreshLoginInfoProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_REQ_CONNECT_WORLD:
                    OnSelectWorldProcess(nSockIndex, nMsgID, msg);
                    break;

                case NFMsg.EGameMsgID.EGMI_ACK_CONNECT_WORLD:
                    OnSelectServerResultProcess(nSockIndex, nMsgID, msg);
                    break;

                default:
                    break;
            }
        }
Ejemplo n.º 11
0
 //////////////////////////////////////////////////////////////////////////
 protected void OnNetSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     switch(eEvent)
     {
         case NFINet.NF_NET_EVENT.NF_NET_EVENT_CONNECTED:
             {
                 //OnClientDisconnect(nSockIndex);
             }
             break;
         default:
             {
                 //OnClientConnected(nSockIndex);
             }
             break;
     }
 }
Ejemplo n.º 12
0
 protected int OnSocketClientEvent(int nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     return(0);
 }
Ejemplo n.º 13
0
 protected int OnSocketClientEvent(int nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     return 0;
 }
Ejemplo n.º 14
0
 private void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet)
 {
     GetNetHandler().OnSocketEvent(nSockIndex, eEvent, pNet);
 }
Ejemplo n.º 15
0
 private void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet)
 {
     GetNetHandler().OnRecivePack(nSockIndex, nMsgID, msg, pNet);
 }
Ejemplo n.º 16
0
 public void RegisterEventCallback(NFINet.OnSocketEvent xEventHandler)
 {
     mxEventHandlerList.Add(xEventHandler);
 }