Ignore:
Timestamp:
Apr 22, 2010, 1:49:16 AM (13 years ago)
Author:
charles
Message:

(trunk libT) #3162 "allow optional end-user configuration of TCP_CONGESTION" -- add jch's implementation of this to trunk for 2.00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r10498 r10508  
    3636 #include <WS2tcpip.h>
    3737#else
     38 #include <sys/socket.h>
     39 #include <netinet/in.h>
     40 #include <netinet/tcp.h>
    3841 #include <arpa/inet.h> /* inet_addr */
    3942 #include <netdb.h>
     
    208211#else
    209212    return 0;
     213#endif
     214}
     215
     216int
     217tr_netSetCongestionControl( int s, const char *algorithm )
     218{
     219#ifdef TCP_CONGESTION
     220    return setsockopt( s, IPPROTO_TCP, TCP_CONGESTION,
     221                       algorithm, strlen(algorithm) + 1 );
     222#else
     223    errno = ENOSYS;
     224    return -1;
    210225#endif
    211226}
Note: See TracChangeset for help on using the changeset viewer.