diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-26 14:07:01 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-26 14:07:01 -0400 |
commit | 46ee2d6be668597adfedcbb6358a091e39f1bcd1 (patch) | |
tree | 552d41aa518aaadfe7f1d9c80d71ac0f93e7354b /core | |
parent | 81e2043df99f4d1b10f51581e50f9048fda951bf (diff) |
Stuff added
Diffstat (limited to 'core')
-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 |