diff options
author | Floogle <[email protected]> | 2023-01-08 15:58:31 +0100 |
---|---|---|
committer | Floogle <[email protected]> | 2023-01-08 15:58:31 +0100 |
commit | 4e69c700d6ca737c36c5a84829bbd04df8acc22b (patch) | |
tree | f0126aedc5421ea5ac3eb1d5db212dae802ad04b /win32.c | |
parent | 311360dbddc350722da00a3026077c47327e932d (diff) | |
download | enet-4e69c700d6ca737c36c5a84829bbd04df8acc22b.tar.gz enet-4e69c700d6ca737c36c5a84829bbd04df8acc22b.zip |
added ENET_SOCKOPT_TTL
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include "enet/enet.h" #include <windows.h> #include <mmsystem.h> +#include <ws2ipdef.h> static enet_uint32 timeBase = 0; @@ -231,6 +232,10 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int)); break; + case ENET_SOCKOPT_TTL: + result = setsockopt (socket, IPPROTO_IP, IP_TTL, (char *) & value, sizeof (int)); + break; + default: break; } @@ -248,6 +253,11 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, & len); break; + case ENET_SOCKOPT_TTL: + len = sizeof(int); + result = getsockopt (socket, IPPROTO_IP, IP_TTL, (char *) value, & len); + break; + default: break; } |