increase the socket's SNDBUF size
This commit is contained in:
parent
1619652997
commit
93b3dc5617
|
@ -119,7 +119,14 @@ makeSocketNonBlocking( int fd )
|
||||||
static int
|
static int
|
||||||
createSocket( int type )
|
createSocket( int type )
|
||||||
{
|
{
|
||||||
return makeSocketNonBlocking( tr_fdSocketCreate( type ) );
|
const int fd = makeSocketNonBlocking( tr_fdSocketCreate( type ) );
|
||||||
|
|
||||||
|
if( fd >= 0 ) {
|
||||||
|
const int buffsize = 1500*3; /* 3x MTU for most ethernet/wireless */
|
||||||
|
setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &buffsize, sizeof( buffsize ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue