aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32.c
diff options
context:
space:
mode:
authoreihrul <eihrul>2012-02-18 10:31:56 +0000
committereihrul <eihrul>2012-02-18 10:31:56 +0000
commit5018dcf2071de5b483d3f452730ee44b0a3248a5 (patch)
tree729d62f46ea4739ac097e39fad158896d581fe5a /win32.c
parent78222dc79e720686028f59bdc8b29b10dbc18cfa (diff)
downloadenet-5018dcf2071de5b483d3f452730ee44b0a3248a5.tar.gz
enet-5018dcf2071de5b483d3f452730ee44b0a3248a5.zip
added support for setting tcp send/receive timeouts
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/win32.c b/win32.c
index 7b23cdd..0a213e7 100644
--- a/win32.c
+++ b/win32.c
@@ -166,6 +166,14 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
result = setsockopt (socket, SOL_SOCKET, SO_SNDBUF, (char *) & value, sizeof (int));
break;
+ case ENET_SOCKOPT_RCVTIMEO:
+ result = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) & value, sizeof (int));
+ break;
+
+ case ENET_SOCKOPT_SNDTIMEO:
+ result = setsockopt (socket, SOL_SOCKET, SO_SNDTIMEO, (char *) & value, sizeof (int));
+ break;
+
default:
break;
}