summaryrefslogtreecommitdiff
path: root/src/DHTPeerLookupTask.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-07-21 23:42:41 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-07-21 23:42:41 +0900
commitc58f736bb91f55fb68151c5c7d977911f993b1ab (patch)
tree98dda8e77c825244f4d43cacc9951c7deaed2666 /src/DHTPeerLookupTask.h
parentf0cd83f809ea679ab035f5827dba93a3ee25c59b (diff)
BtRegistry now holds BitTorrent TCP server port.
Because BitTorrent TCP server port is global configuration, it is not preferable that per download resource BtRuntime holds it. We also refactored and eliminated ugly static variable in PeerListenCommand. If TCP port is necessary, we inject it to them directly.
Diffstat (limited to 'src/DHTPeerLookupTask.h')
-rw-r--r--src/DHTPeerLookupTask.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/DHTPeerLookupTask.h b/src/DHTPeerLookupTask.h
index e3c69c85..e80bbe59 100644
--- a/src/DHTPeerLookupTask.h
+++ b/src/DHTPeerLookupTask.h
@@ -43,7 +43,6 @@ namespace aria2 {
class DownloadContext;
class Peer;
class PeerStorage;
-class BtRuntime;
class DHTGetPeersReplyMessage;
class DHTPeerLookupTask:
@@ -52,10 +51,11 @@ private:
std::map<std::string, std::string> tokenStorage_;
SharedHandle<PeerStorage> peerStorage_;
-
- SharedHandle<BtRuntime> btRuntime_;
+ uint16_t tcpPort_;
public:
- DHTPeerLookupTask(const SharedHandle<DownloadContext>& downloadContext);
+ DHTPeerLookupTask
+ (const SharedHandle<DownloadContext>& downloadContext,
+ uint16_t tcpPort);
virtual void getNodesFromMessage
(std::vector<SharedHandle<DHTNode> >& nodes,
@@ -69,8 +69,6 @@ public:
virtual SharedHandle<DHTMessageCallback> createCallback();
virtual void onFinish();
-
- void setBtRuntime(const SharedHandle<BtRuntime>& btRuntime);
void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage);
};