Skip to content

Commit

Permalink
punch nat response handling
Browse files Browse the repository at this point in the history
  • Loading branch information
trippyone committed Jun 8, 2024
1 parent 105aa76 commit c4d2802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Fika.Core/Networking/FikaPingingClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void OnNetworkReceiveUnconnected(IPEndPoint remoteEndPoint, NetPacketRead

if (reader.TryGetString(out string result))
{
if (result == "fika.hello")
if (result == "fika.hello" || result == "fika.punchnat")
{
Received = true;
MatchmakerAcceptPatches.RemoteIp = remoteEndPoint.Address.ToString();
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Networking/NatPunch/NatPunchUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void PunchNat(NetManager netManager, IPEndPoint endPoint)
{
// bogus punch data
var resp = new NetDataWriter();
resp.Put(9999);
resp.Put("fika.punchnat");

// send a couple of packets to punch a hole
for (int i = 0; i < 10; i++)
Expand Down

0 comments on commit c4d2802

Please sign in to comment.