mirror of https://github.com/aria2/aria2
Code cleanup
parent
97fde60f3e
commit
954d595ee8
|
@ -46,6 +46,15 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// This is the hard limit of the number of "fresh peer" and "dropped
|
||||||
|
// peer". This number is treated as the sum of IPv4 and IPv6 peers.
|
||||||
|
const size_t DEFAULT_MAX_FRESH_PEER = 50;
|
||||||
|
const size_t DEFAULT_MAX_DROPPED_PEER = 50;
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
const std::string UTPexExtensionMessage::EXTENSION_NAME = "ut_pex";
|
const std::string UTPexExtensionMessage::EXTENSION_NAME = "ut_pex";
|
||||||
|
|
||||||
UTPexExtensionMessage::UTPexExtensionMessage(uint8_t extensionMessageID):
|
UTPexExtensionMessage::UTPexExtensionMessage(uint8_t extensionMessageID):
|
||||||
|
|
|
@ -65,7 +65,6 @@ private:
|
||||||
|
|
||||||
size_t maxDroppedPeer_;
|
size_t maxDroppedPeer_;
|
||||||
|
|
||||||
|
|
||||||
std::pair<std::pair<std::string, std::string>,
|
std::pair<std::pair<std::string, std::string>,
|
||||||
std::pair<std::string, std::string> >
|
std::pair<std::string, std::string> >
|
||||||
createCompactPeerListAndFlag(const std::vector<SharedHandle<Peer> >& peers);
|
createCompactPeerListAndFlag(const std::vector<SharedHandle<Peer> >& peers);
|
||||||
|
@ -131,10 +130,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
static const time_t DEFAULT_INTERVAL = 60;
|
static const time_t DEFAULT_INTERVAL = 60;
|
||||||
|
|
||||||
static const size_t DEFAULT_MAX_FRESH_PEER = 50;
|
|
||||||
|
|
||||||
static const size_t DEFAULT_MAX_DROPPED_PEER = 50;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedHandle<UTPexExtensionMessage> UTPexExtensionMessageHandle;
|
typedef SharedHandle<UTPexExtensionMessage> UTPexExtensionMessageHandle;
|
||||||
|
|
Loading…
Reference in New Issue