summaryrefslogtreecommitdiff
path: root/src/BtRegistry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-02-25 00:56:49 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-02-25 00:56:49 +0900
commitd68741697ad93e4099b16c7fbfedc7ed4b98b75f (patch)
treee59f740db763e412818141cb72e62a0e7b26b108 /src/BtRegistry.cc
parentb782a56b1c178795fda4ca7ed2ee4d9621927aab (diff)
Support UDP tracker
It shares UDP listening port with IPv4 DHT. At the moment, in order to enable UDP tracker support, enable IPv4 DHT.
Diffstat (limited to 'src/BtRegistry.cc')
-rw-r--r--src/BtRegistry.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/BtRegistry.cc b/src/BtRegistry.cc
index 1189a652..273f0130 100644
--- a/src/BtRegistry.cc
+++ b/src/BtRegistry.cc
@@ -42,12 +42,14 @@
#include "BtProgressInfoFile.h"
#include "bittorrent_helper.h"
#include "LpdMessageReceiver.h"
+#include "UDPTrackerClient.h"
#include "NullHandle.h"
namespace aria2 {
BtRegistry::BtRegistry()
- : tcpPort_(0)
+ : tcpPort_(0),
+ udpPort_(0)
{}
BtRegistry::~BtRegistry() {}
@@ -107,6 +109,12 @@ void BtRegistry::setLpdMessageReceiver
lpdMessageReceiver_ = receiver;
}
+void BtRegistry::setUDPTrackerClient
+(const SharedHandle<UDPTrackerClient>& tracker)
+{
+ udpTrackerClient_ = tracker;
+}
+
BtObject::BtObject
(const SharedHandle<DownloadContext>& downloadContext,
const SharedHandle<PieceStorage>& pieceStorage,