Some buffer tuning.

This commit is contained in:
Adam Ierymenko 2020-11-17 15:34:42 -05:00
parent 3acd901c88
commit 2fcc344299
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
3 changed files with 6 additions and 13 deletions

View file

@ -351,14 +351,14 @@ public:
int tmpbs = bs;
if (setsockopt(s,SOL_SOCKET,SO_RCVBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
break;
bs -= 16384;
bs -= 4096;
}
bs = bufferSize;
while (bs >= 65536) {
int tmpbs = bs;
if (setsockopt(s,SOL_SOCKET,SO_SNDBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
break;
bs -= 16384;
bs -= 4096;
}
}