コード例 #1
0
 private void OnGUID(CMSG_GUID cpkt)
 {
     Trace.TraceInformation("GUID Recieved from {0}", this.socket.RemoteEndPoint);
     try
     {
         string key = cpkt.Key;
         if (CheckCrc == true && key != Program.GuidKey)
         {
             IPEndPoint endpoint = (IPEndPoint)this.socket.RemoteEndPoint;
             Trace.TraceError(String.Format("GUID Mismatch on ip {1} key: {0} ", key, endpoint.Address));
             this.Close();
             return;
         }
         else
         {
             SMSG_IDENTIFY spkt2 = new SMSG_IDENTIFY();
             this.Send((byte[])spkt2);
         }
     }
     catch (Exception ex)
     {
         Trace.TraceError("An unhandled exception occured {0}", ex.Message);
         this.Close();
     }
 }
コード例 #2
0
 private void OnGUID(CMSG_GUID cpkt)
 {
     Trace.TraceInformation("GUID Recieved from {0}", this.socket.RemoteEndPoint);
     try
     {
         string key = cpkt.Key;
         if (CheckCrc == true && key != Program.GuidKey)
         {
             IPEndPoint endpoint = (IPEndPoint)this.socket.RemoteEndPoint;
             Trace.TraceError(String.Format("GUID Mismatch on ip {1} key: {0} ", key, endpoint.Address));
             this.Close();
             return;
         }
         else
         {
             SMSG_IDENTIFY spkt2 = new SMSG_IDENTIFY();
             this.Send((byte[])spkt2);
         }
     }
     catch (Exception ex)
     {
         Trace.TraceError("An unhandled exception occured {0}", ex.Message);
         this.Close();
     }
 }