From e4840c3385f9bb061a00e4d112acc277929adac1 Mon Sep 17 00:00:00 2001 From: wjchen Date: Sat, 2 Jan 2016 22:13:29 +0800 Subject: [PATCH] Increase rcvbuf to 32k. 3ds's default rcvbuf is 4k, increase it, cia install speed is faster. Rcvbuf of win and osx is 65535. --- source/ui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ui.cpp b/source/ui.cpp index 365661f..d30bb43 100644 --- a/source/ui.cpp +++ b/source/ui.cpp @@ -577,7 +577,11 @@ int socketListen(u16 port) { if(fd < 0) { return -1; } - + int rcvbuf = 32768; + if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)) < 0) { + + } + struct sockaddr_in address; memset(&address, 0, sizeof(address)); address.sin_family = AF_INET;