Changeset 10610


Ignore:
Timestamp:
May 1, 2010, 4:19:40 PM (11 years ago)
Author:
livings124
Message:

add "local peer discovery" peer info to the inspector

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/CreatorWindowController.m

    r10522 r10610  
    232232                        " The torrent file will only be useful if you plan to upload the file to a tracker website"
    233233                        " that will add the addresses for you.", "Create torrent -> blank address -> message")
    234                     : NSLocalizedString(@"The transfer will not contact trackers for peers,"
    235                         " and will have to rely solely on DHT and PEX to download and seed.",
     234                    : NSLocalizedString(@"The transfer will not contact trackers for peers,  and will have to rely solely on"
     235                        " non-tracker peer discovery methods such as PEX and DHT to download and seed.",
    236236                        "Create torrent -> blank address -> message");
    237237       
  • trunk/macosx/InfoGeneralViewController.m

    r10494 r10610  
    131131        [fHashField setToolTip: hashString];
    132132        [fSecureField setStringValue: [torrent privateTorrent]
    133                         ? NSLocalizedString(@"Private Torrent, PEX and DHT automatically disabled", "Inspector -> private torrent")
     133                        ? NSLocalizedString(@"Private Torrent, non-tracker peer discovery disabled", "Inspector -> private torrent")
    134134                        : NSLocalizedString(@"Public Torrent", "Inspector -> private torrent")];
    135135       
  • trunk/macosx/InfoPeersViewController.m

    r10494 r10610  
    136136        [fWebSeeds removeAllObjects];
    137137   
    138     NSUInteger known = 0, connected = 0, tracker = 0, incoming = 0, cache = 0, pex = 0, dht = 0, ltep = 0,
     138    NSUInteger known = 0, connected = 0, tracker = 0, incoming = 0, cache = 0, lds = 0, pex = 0, dht = 0, ltep = 0,
    139139                toUs = 0, fromUs = 0;
    140140    BOOL anyActive = false;
     
    158158                incoming += [torrent totalPeersIncoming];
    159159                cache += [torrent totalPeersCache];
     160                lds += [torrent totalPeersLocal];
    160161                pex += [torrent totalPeersPex];
    161162                dht += [torrent totalPeersDHT];
     
    192193                [fromComponents addObject: [NSString stringWithFormat:
    193194                                        NSLocalizedString(@"%d cache", "Inspector -> Peers tab -> peers"), cache]];
     195            if (lds > 0)
     196                [fromComponents addObject: [NSString stringWithFormat:
     197                                        NSLocalizedString(@"%d local discovery", "Inspector -> Peers tab -> peers"), lds]];
    194198            if (pex > 0)
    195199                [fromComponents addObject: [NSString stringWithFormat:
     
    382386            case TR_PEER_FROM_RESUME:
    383387                [components addObject: NSLocalizedString(@"From: cache", "Inspector -> Peers tab -> table row tooltip")];
     388                break;
     389            case TR_PEER_FROM_LDS:
     390                [components addObject: NSLocalizedString(@"From: local peer discovery", "Inspector -> Peers tab -> table row tooltip")];
    384391                break;
    385392            case TR_PEER_FROM_PEX:
  • trunk/macosx/Torrent.h

    r10437 r10610  
    184184- (NSInteger) totalPeersPex;
    185185- (NSInteger) totalPeersDHT;
     186- (NSInteger) totalPeersLocal;
    186187- (NSInteger) totalPeersLTEP;
    187188- (NSInteger) totalPeersKnown;
  • trunk/macosx/Torrent.m

    r10526 r10610  
    12011201{
    12021202    return fStat->peersFrom[TR_PEER_FROM_DHT];
     1203}
     1204
     1205- (NSInteger) totalPeersLocal
     1206{
     1207    return fStat->peersFrom[TR_PEER_FROM_LDS];
    12031208}
    12041209
Note: See TracChangeset for help on using the changeset viewer.