Add MTU option.

This commit is contained in:
Jean-Baptiste Perrier
2021-02-15 20:53:07 +01:00
parent 134aec2d15
commit bc6281ee63
2 changed files with 3 additions and 0 deletions

View File

@@ -76,6 +76,8 @@ enum class FLAXENGINE_API NetworkSocketOption
NoDelay,
/// <summary>Enables IPv6 communication only for TCP socket.</summary>
IPv6Only,
/// <summary>Retrieve the current path MTU, the socket must be connected UDP/TCP.</summary>
Mtu
};
struct FLAXENGINE_API NetworkSocketState

View File

@@ -132,6 +132,7 @@ static void TranslateSockOptToNative(NetworkSocketOption option, int32* level, i
SOCKOPT(NetworkSocketOption::Error, SOL_SOCKET, SO_ERROR)
SOCKOPT(NetworkSocketOption::NoDelay, IPPROTO_TCP, TCP_NODELAY)
SOCKOPT(NetworkSocketOption::IPv6Only, IPPROTO_IPV6, IPV6_V6ONLY)
SOCKOPT(NetworkSocketOption::Mtu, IPPROTO_IP , IP_MTU)
}
}