diff options
Diffstat (limited to 'core/network.c')
-rw-r--r-- | core/network.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/network.c b/core/network.c index 10a37b80..9434f6fb 100644 --- a/core/network.c +++ b/core/network.c | |||
@@ -56,6 +56,20 @@ int init_networking(IP ip ,uint16_t port) | |||
56 | //initialize our socket | 56 | //initialize our socket |
57 | sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); | 57 | sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); |
58 | 58 | ||
59 | //Functions to increase the size of the send and recieve UDP buffers | ||
60 | //NOTE: uncomment if necessary. | ||
61 | /* | ||
62 | int n = 1024 * 1024 * 2; | ||
63 | if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&n, sizeof(n)) == -1) | ||
64 | { | ||
65 | return -1; | ||
66 | } | ||
67 | |||
68 | if(setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*)&n, sizeof(n)) == -1) | ||
69 | { | ||
70 | return -1; | ||
71 | }*/ | ||
72 | |||
59 | //Set socket nonblocking | 73 | //Set socket nonblocking |
60 | #ifdef WIN32 | 74 | #ifdef WIN32 |
61 | //I think this works for windows | 75 | //I think this works for windows |