//接收TCPServer信息字符串
        public static void RecvTCPDatagram(object sender, NetEventArgs e)
        {
            String msg1 = e.Client.Datagram;

            //HERRYConsole.WriteLine(msg1);
            string[] sResult = DataSplit(e.Client.Datagram);

            if (sResult != null && sResult.Length > 2)
            {
                Console.WriteLine(" TTTTTTTTT " + sResult[1]);
                Protocol p = AppUtil.ParseProtocol(sResult[1]);
                if (p != Protocol.UNKNOWN)
                {
                    Console.WriteLine(" Protocol @@@@@@@@@@@@@@@@  " + p);
                    LogUtil.Info("Protocol : " + p + " Msg content " + msg1);
                    IMsgHandler handler = GetHandler(p);
                    if (handler != null)
                    {
                        handler.Receive(sResult);
                    }
                }
            }
        }
        //接收TCPServer信息字符串
        public static void RecvTCPDatagram(object sender, NetEventArgs e)
        {
            String msg1 = e.Client.Datagram;
            //HERRYConsole.WriteLine(msg1);
            string[] sResult = DataSplit(e.Client.Datagram);

            if (sResult != null && sResult.Length > 2)
            {
                Console.WriteLine(" TTTTTTTTT " + sResult[1]);
                Protocol p = AppUtil.ParseProtocol(sResult[1]);
                if (p != Protocol.UNKNOWN)
                {
                    Console.WriteLine(" Protocol @@@@@@@@@@@@@@@@  " + p);
                    LogUtil.Info("Protocol : " +p+ " Msg content "+ msg1);
                    IMsgHandler handler = GetHandler(p);
                    if (handler != null)
                        handler.Receive(sResult);
                }
            }
        }
Exemple #3
0
        //接收TCPServer信息字符串
        public static void RecvTCPDatagram(object sender, NetEventArgs e)
        {
            String msg1 = e.Client.Datagram;

            dsHandler.Receive(msg1);
        }
 //接收TCPServer信息字符串
 public static void RecvTCPDatagram(object sender, NetEventArgs e)
 {
     String msg1 = e.Client.Datagram;
     dsHandler.Receive(msg1);
 }