Example #1
0
        void OnClientMessage(object sender, MessageHeader msghdr)
        {
            Type msgtype = msghdr.GetType();

            if (MessageHandlers.ContainsKey(msgtype))
            {
                EventHandler <MessageHeader> MessageHandler = MessageHandlers[msgtype];
                MessageHandler?.Invoke(sender, msghdr);
            }
            ClientMessageHandler?.Invoke(sender, msghdr);
        }
 public void OnClientMessage(object sender, MessageHeader msghdr)
 {
     Log.Debug($"OnClientMessage() type:{msghdr.GetType().Name}");
 }