From 524af7ef07c8b3d49bedf55415e1752d1b7855b0 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 20 Sep 2013 08:25:01 -0400 Subject: [PATCH] Increased the size of the UDP buffers. --- toxcore/network.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/toxcore/network.c b/toxcore/network.c index e04d2608..49e1726c 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -325,18 +325,10 @@ Networking_Core *new_networking(IP ip, uint16_t port) #endif /* Functions to increase the size of the send and receive 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; - */ + setsockopt(temp->sock, SOL_SOCKET, SO_RCVBUF, (char *)&n, sizeof(n)); + setsockopt(temp->sock, SOL_SOCKET, SO_SNDBUF, (char *)&n, sizeof(n)); /* Enable broadcast on socket */ int broadcast = 1;