mirror of https://github.com/aria2/aria2
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --enable-peer-exchange command-line option. * src/OptionHandlerFactory.cc * src/HelpItemFactory.cc * src/option_processing.cc * src/usage_text.hpull/1/head
parent
e5e75ee4ed
commit
eb718cfda0
|
@ -1,3 +1,11 @@
|
|||
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Added --enable-peer-exchange command-line option.
|
||||
* src/OptionHandlerFactory.cc
|
||||
* src/HelpItemFactory.cc
|
||||
* src/option_processing.cc
|
||||
* src/usage_text.h
|
||||
|
||||
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Move extension from BtRuntime to ExtensionMessageFactory, because
|
||||
|
|
|
@ -329,6 +329,11 @@ TagContainerHandle HelpItemFactory::createHelpItems()
|
|||
item->addTag(TAG_BITTORRENT);
|
||||
tc->addItem(item);
|
||||
}
|
||||
{
|
||||
HelpItemHandle item = new HelpItem(PREF_ENABLE_PEER_EXCHANGE, TEXT_ENABLE_PEER_EXCHANGE, V_TRUE);
|
||||
item->addTag(TAG_BITTORRENT);
|
||||
tc->addItem(item);
|
||||
}
|
||||
#endif // ENABLE_BITTORRENT
|
||||
#ifdef ENABLE_METALINK
|
||||
{
|
||||
|
|
|
@ -108,6 +108,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
|
|||
handlers.push_back(new ParameterOptionHandler(PREF_METALINK_PREFERRED_PROTOCOL,
|
||||
Strings(¶ms[0], ¶ms[arrayLength(params)])));
|
||||
}
|
||||
handlers.push_back(new BooleanOptionHandler(PREF_ENABLE_PEER_EXCHANGE));
|
||||
|
||||
return handlers;
|
||||
}
|
||||
|
|
|
@ -200,6 +200,7 @@ Option* option_processing(int argc, char* const argv[])
|
|||
{ "seed-ratio", required_argument, &lopt, 23 },
|
||||
{ "max-upload-limit", required_argument, &lopt, 24 },
|
||||
{ "peer-id-prefix", required_argument, &lopt, 25 },
|
||||
{ "enable-peer-exchange", optional_argument, &lopt, 26 },
|
||||
#endif // ENABLE_BITTORRENT
|
||||
#ifdef ENABLE_METALINK
|
||||
{ "metalink-file", required_argument, NULL, 'M' },
|
||||
|
@ -291,6 +292,10 @@ Option* option_processing(int argc, char* const argv[])
|
|||
break;
|
||||
case 25:
|
||||
cmdstream << PREF_PEER_ID_PREFIX << "=" << optarg << "\n";
|
||||
break;
|
||||
case 26:
|
||||
cmdstream << PREF_ENABLE_PEER_EXCHANGE << "=" << toBoolArg(optarg) << "\n";
|
||||
break;
|
||||
case 100:
|
||||
cmdstream << PREF_METALINK_VERSION << "=" << optarg << "\n";
|
||||
break;
|
||||
|
|
|
@ -254,6 +254,8 @@ _(" --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID
|
|||
" specified, the random alphabet characters are\n"\
|
||||
" added to make it's length 20 bytes.\n"\
|
||||
" Default: -aria2-")
|
||||
#define TEXT_ENABLE_PEER_EXCHANGE \
|
||||
_(" --enable-peer-exchange[=true|false] Enable peer exchange extension.")
|
||||
#define TEXT_METALINK_FILE \
|
||||
_(" -M, --metalink-file=METALINK_FILE The file path to the .metalink file.")
|
||||
#define TEXT_METALINK_SERVERS \
|
||||
|
|
Loading…
Reference in New Issue