Some buffer tuning.
This commit is contained in:
parent
3acd901c88
commit
2fcc344299
3 changed files with 6 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue