public void OnReceivedCompleted(SocketMsg msg)
 {
     if (hyperSocket != null && msg.data != null)
     {
         if (clientSocket.ProtocolType == ProtocolType.Tcp)
         {
             // 验证通过
             if (hyperSocket.IsValid)
             {
                 if (msg.data != null && msg.data.Compare(HyperSocket.HeartPongBytes))
                 {
                     Interlocked.Exchange(ref heartCheckTimeOut, DateTime.UtcNow.Ticks);
                     if (!hasFirstRecvPong)
                     {
                         hasFirstRecvPong = true; listener.OnOpen(hyperSocket);
                     }
                 }
                 else if (hyperSocket.config.UseSSL && !hyperSocket.isSecurityConnected)
                 {
                     if (msg.data != null)
                     {
                         var signOk = hyperSocket.ssl.RSAVerifyData(hyperSocket.ssl.AESEncrypt(HyperSocket.SignSecurityBytes), msg.data);
                         if (signOk)
                         {
                             hyperSocket.isSecurityConnected = true;
                             hyperSocket.timeFlow.StartTimeFlowES();
                             Send(hyperSocket.SessionId, HyperSocket.ConnectedClientBytes);
                         }
                     }
                 }
                 else
                 {
                     if (hyperSocket.config.UseSSL && (hyperSocket.config.SSLMode == 0 || hyperSocket.config.SSLMode == 1))
                     {
                         listener.OnTcpReceive(hyperSocket.ssl.AESDecrypt(msg.data), hyperSocket);
                     }
                     else
                     {
                         listener.OnTcpReceive(msg.data, hyperSocket);
                     }
                 }
             }
             else
             {
                 hyperSocket.InitializeUdpClient(msg.data);
             }
         }
         else if (clientSocket.ProtocolType == ProtocolType.Udp)
         {
             // 验证通过
             if (hyperSocket.SessionId == msg.sessionId)
             {
                 kcpHelper.Recv(msg.data);
             }
         }
     }
 }