Beispiel #1
0
 public void UnRegisterHandler(short msgType, InsightNetworkMessageDelegate handler)
 {
     if (messageHandlers.ContainsKey(msgType))
     {
         messageHandlers[msgType] -= handler;
     }
 }
Beispiel #2
0
 public void RegisterHandler(short msgType, InsightNetworkMessageDelegate handler)
 {
     if (messageHandlers.ContainsKey(msgType))
     {
         Debug.Log("NetworkConnection.RegisterHandler replacing " + msgType);
     }
     messageHandlers[msgType] = handler;
 }
Beispiel #3
0
        public void UnRegisterHandler <T>(InsightNetworkMessageDelegate handler)
        {
            int msgType = GetId <T>();

            if (messageHandlers.ContainsKey(msgType))
            {
                messageHandlers[msgType] -= handler;
            }
        }
Beispiel #4
0
        public void RegisterHandler <T>(InsightNetworkMessageDelegate handler)
        {
            int msgType = GetId <T>();

            if (messageHandlers.ContainsKey(msgType))
            {
                logger.Log("NetworkConnection.RegisterHandler replacing " + msgType);
            }
            messageHandlers[msgType] = handler;
        }