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 /unix.c | |
parent | 311360dbddc350722da00a3026077c47327e932d (diff) | |
download | enet-4e69c700d6ca737c36c5a84829bbd04df8acc22b.tar.gz enet-4e69c700d6ca737c36c5a84829bbd04df8acc22b.zip |
added ENET_SOCKOPT_TTL
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -348,6 +348,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; } @@ -366,6 +370,11 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len); break; + case ENET_SOCKOPT_TTL: + len = sizeof (int); + result = getsockopt (socket, IPPROTO_IP, IP_TTL, (char *) value, & len); + break; + default: break; } |