diff options
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; } |