Skip to content

Commit

Permalink
perf(Peer): updating header size for ipv6
Browse files Browse the repository at this point in the history
ipv6 has a header size of 40, compared to 20 of ipv4

We should use ipv6 value so that all message will be inside the 1280 MTU
  • Loading branch information
James-Frowen committed Sep 20, 2021
1 parent 6663889 commit a8798f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Mirage/Runtime/SocketLayer/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public class Config
public float DisconnectDuration = 1;

/// <summary>
/// IP + UDP Header
/// IPv6 + UDP Header
/// </summary>
const int HEADER_SIZE = 20 + 8;
const int HEADER_SIZE = 40 + 8;

/// <summary>
/// MTU is expected to be atleast this number
Expand Down

0 comments on commit a8798f0

Please sign in to comment.