From 46ee2d6be668597adfedcbb6358a091e39f1bcd1 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 26 Jun 2013 14:07:01 -0400 Subject: Stuff added --- core/network.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'core/network.c') 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) //initialize our socket sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + //Functions to increase the size of the send and recieve UDP buffers + //NOTE: uncomment if necessary. + /* + int n = 1024 * 1024 * 2; + if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&n, sizeof(n)) == -1) + { + return -1; + } + + if(setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*)&n, sizeof(n)) == -1) + { + return -1; + }*/ + //Set socket nonblocking #ifdef WIN32 //I think this works for windows -- cgit v1.2.3