Changeset 7122


Ignore:
Timestamp:
Nov 16, 2008, 9:16:14 PM (12 years ago)
Author:
charles
Message:

increase the socket's SNDBUF size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r6944 r7122  
    120120createSocket( int type )
    121121{
    122     return makeSocketNonBlocking( tr_fdSocketCreate( type ) );
     122    const int fd = makeSocketNonBlocking( tr_fdSocketCreate( type ) );
     123
     124    if( fd >= 0 ) {
     125        const int buffsize = 1500*3; /* 3x MTU for most ethernet/wireless */
     126        setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &buffsize, sizeof( buffsize ) );
     127    }
     128
     129    return fd;
    123130}
    124131
Note: See TracChangeset for help on using the changeset viewer.