Changeset 11948


Ignore:
Timestamp:
Feb 18, 2011, 12:43:24 AM (11 years ago)
Author:
jch
Message:

When uTP is enabled, open uTP connections to some peers.

Since we don't implement falling back to TCP yet, we're very
conservative: we only use uTP when we have good reasons to believe
the peer speaks uTP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r11945 r11948  
    38423842    tr_peerIo * io;
    38433843    const time_t now = tr_time( );
    3844 
    3845     tordbg( t, "Starting an OUTGOING connection with %s", tr_atomAddrStr( atom ) );
     3844    tr_bool utp = FALSE;
     3845
     3846    /* Eventually, we'll want this to do something smart, like trying µTP
     3847       first and eventually falling back to TCP.  For now, only open µTP
     3848       connections if we have good reasons to believe the peer knows about
     3849       ÂµTP. */
     3850
     3851    utp =
     3852        tr_sessionIsUTPEnabled(mgr->session) &&
     3853        (atom->flags & ADDED_F_UTP_FLAGS);
     3854
     3855    tordbg( t, "Starting an OUTGOING%s connection with %s",
     3856            utp ? " µTP" : "",
     3857            tr_atomAddrStr( atom ) );
    38463858
    38473859    io = tr_peerIoNewOutgoing( mgr->session,
     
    38513863                               t->tor->info.hash,
    38523864                               t->tor->completeness == TR_SEED,
    3853                                0 );
     3865                               utp );
    38543866
    38553867    if( io == NULL )
Note: See TracChangeset for help on using the changeset viewer.