|
@@ -168,8 +168,14 @@ namespace UdPunching.ExampleW
|
|
|
case ExchangeMessageId.KeepAliveAckNoChg:
|
|
|
break;
|
|
|
|
|
|
+ case ExchangeMessageId.PeerKnockReqAckRelay:
|
|
|
+ break;
|
|
|
+
|
|
|
+ case ExchangeMessageId.PeerKnockReqDeniedRelay:
|
|
|
+ break;
|
|
|
+
|
|
|
default:
|
|
|
- throw new ArgumentOutOfRangeException();
|
|
|
+ throw new ArgumentOutOfRangeException("msg.Id", "no excepted message from server:" + msg.Id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -182,7 +188,8 @@ namespace UdPunching.ExampleW
|
|
|
|
|
|
Invoke(new Action(() =>
|
|
|
{
|
|
|
- Log($"RECV FROM {_saeRecv.RemoteEndPoint},{Encoding.UTF8.GetString(_saeRecv.Buffer, 0, _saeRecv.BytesTransferred)}");
|
|
|
+ //TODO: decode message by peer public key
|
|
|
+ //Log($"RECV FROM {_saeRecv.RemoteEndPoint},{Encoding.UTF8.GetString(_saeRecv.Buffer, 0, _saeRecv.BytesTransferred)}");
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
@@ -198,7 +205,6 @@ namespace UdPunching.ExampleW
|
|
|
catch (Exception exception)
|
|
|
{
|
|
|
Log($"ERROR ProcessPacket:{exception}");
|
|
|
- Invoke(new Action(() => { StopButton_Click(null, null); }));
|
|
|
}
|
|
|
}
|
|
|
else
|