Changeset 7859


Ignore:
Timestamp:
Feb 9, 2009, 7:37:09 PM (13 years ago)
Author:
charles
Message:

(1.5x daemon) #1392: changing per-torrent peer limits via transmission-remote

Location:
branches/1.5x/daemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/daemon/remote.c

    r7857 r7859  
    6868    { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL },
    6969    { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL },
    70     { 'f', "files",                "List the current torrent's files", "f",  0, NULL },
     70    { 'f', "files",                "List the current torrent(s)' files", "f",  0, NULL },
    7171    { 'g', "get",                  "Mark files for download", "g",  1, "<files>" },
    7272    { 'G', "no-get",               "Mark files for not downloading", "G",  1, "<files>" },
    73     { 'i', "info",                 "Show details of the current torrent(s)", "i",  0, NULL },
     73    { 'i', "info",                 "Show the current torrent(s)' details", "i",  0, NULL },
     74    { 920, "session-info",         "Show the session's details", "si", 0, NULL },
    7475    { 'l', "list",                 "List all torrents", "l",  0, NULL },
    7576    { 'm', "portmap",              "Enable portmapping via NAT-PMP or UPnP", "m",  0, NULL },
     
    8182    { 902, "priority-low",         "Set the files' priorities as low", "pl", 1, "<files>" },
    8283    { 'r', "remove",               "Remove the current torrent(s)", "r",  0, NULL },
     84    { 930, "peers",                "Set the current torrent(s)' maximum number of peers each", "pr", 1, "<max>" },
     85    { 931, "global-peers",         "Set the global maximum number of peers", "gpr", 1, "<max>" },
    8386    { 'R', "remove-and-delete",    "Remove the current torrent(s) and delete local data", NULL, 0, NULL },
    84     { 920, "session",              "Print session information", NULL,  0, NULL },
    8587    { 's', "start",                "Start the current torrent(s)", "s",  0, NULL },
    8688    { 'S', "stop",                 "Stop the current torrent(s)", "S",  0, NULL },
     
    9395    { 'x', "pex",                  "Enable peer exchange (PEX)", "x",  0, NULL },
    9496    { 'X', "no-pex",               "Disable peer exchange (PEX)", "X",  0, NULL },
    95     { 'z', "peers",                "List the current torrent's peers", "z",  0, NULL },
     97    { 940, "peer-info",            "List the current torrent(s)' peers", "pi",  0, NULL },
    9698    {   0, NULL,                   NULL, NULL, 0, NULL }
    9799};
     
    468470                break;
    469471
    470             case 'z':
    471                 tr_bencDictAddStr( &top, "method", "torrent-get" );
    472                 tr_bencDictAddInt( &top, "tag", TAG_PEERS );
    473                 addIdArg( args, id );
    474                 fields = tr_bencDictAddList( args, "fields", 1 );
    475                 tr_bencListAddStr( fields, "peers" );
    476                 break;
    477 
    478472            case 900:
    479473                tr_bencDictAddStr( &top, "method", "torrent-set" );
     
    512506                tr_bencDictAddStr( &top, "method", "session-get" );
    513507                tr_bencDictAddInt( &top, "tag", TAG_SESSION );
     508                break;
     509
     510            case 930:
     511                tr_bencDictAddStr( &top, "method", "torrent-set" );
     512                addIdArg( args, id );
     513                tr_bencDictAddInt( args, "peer-limit", atoi(optarg) );
     514                break;
     515
     516            case 931:
     517                tr_bencDictAddStr( &top, "method", "session-set" );
     518                tr_bencDictAddInt( args, "peer-limit", atoi(optarg) );
     519                break;
     520
     521            case 940:
     522                tr_bencDictAddStr( &top, "method", "torrent-get" );
     523                tr_bencDictAddInt( &top, "tag", TAG_PEERS );
     524                addIdArg( args, id );
     525                fields = tr_bencDictAddList( args, "fields", 1 );
     526                tr_bencListAddStr( fields, "peers" );
    514527                break;
    515528
  • branches/1.5x/daemon/transmission-remote.1

    r7821 r7859  
    1818.Op Fl f
    1919.Op Fl g Ar files
     20.Op Fl gpr Ar peers
    2021.Op Fl G Ar files
    2122.Op Fl h
     
    2829.Op Fl pl Ar files
    2930.Op Fl pn Ar files
     31.Op Fl pr Ar peers
    3032.Op Fl r
    3133.Op Fl R
    3234.Op Fl s | S
    33 .Op Fl Ar -session
     35.Op Fl si
    3436.Op Fl t Ar all | Ar id | Ar hash
    3537.Op Fl u Ar number | Fl U
     
    3840.Op Fl w Ar download-dir
    3941.Op Fl x | X
    40 .Op Fl z | peers
     42.Op Fl pi
    4143.Ek
    4244.Sh DESCRIPTION
     
    9799Show details of the current torrent(s)
    98100
     101.It Fl si Fl -session-info
     102List session information from the server
     103
    99104.It Fl l Fl -list
    100105List all torrents
     
    133138Mark file(s) as low priority.
    134139
     140.It Fl pr Fl -peers Ar number
     141Set the current torrent(s)' maximum number of peers
     142
     143.It Fl gpr Fl -global-peers Ar number
     144Set the maximum number of peers allowed globally
     145
    135146.It Fl r Fl -remove
    136147Remove the current torrent(s).  This does not delete the downloaded data.
     
    144155.It Fl S Fl -stop
    145156Stop the current torrent(s) from downloading or seeding
    146 
    147 .It Fl -session
    148 List session information from the server
    149157
    150158.It Fl t Fl -torrent Ar all | id | torrent-hash
     
    181189Disable peer exchange (PEX).
    182190
    183 .It Fl z Fl -peers
     191.It Fl pi Fl -peer-info
    184192List the current torrent's connected peers.
    185193In the `status' section of the list, the following shorthand is used:
Note: See TracChangeset for help on using the changeset viewer.