|
@@ -59,11 +59,23 @@ namespace UdPunching.Serv
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ byte[] msgData = null;
|
|
|
if (isSessionValidated)
|
|
|
{
|
|
|
- var msgData = TransferCodec.DecodeData(_serverRsaCryptoServiceProvider, sae.Buffer);
|
|
|
- Console.WriteLine($"Incoming packet#{packetSeq:0,000,000} MsgLength: {msgData.Length}");
|
|
|
+ try
|
|
|
+ {
|
|
|
+ msgData = TransferCodec.DecodeData(_serverRsaCryptoServiceProvider, sae.Buffer);
|
|
|
+ Console.WriteLine($"Incoming packet#{packetSeq:0,000,000} MsgLength: {msgData.Length}");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Console.WriteLine(ex);
|
|
|
+ isSessionValidated = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ if (isSessionValidated)
|
|
|
+ {
|
|
|
var reqMsg = new ExchangeMessage(msgData);
|
|
|
Console.WriteLine($"Incoming packet#{packetSeq:0,000,000} Flags: {reqMsg.Flags}");
|
|
|
|