summaryrefslogtreecommitdiff
path: root/src/LpdMessageDispatcher.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-22 15:58:05 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-22 15:58:05 +0000
commit6ae5882f3cb644369382583f0cea8d6de6dd3da0 (patch)
treecf71237ecadbcc8079dae0b9d64bb8086add44d5 /src/LpdMessageDispatcher.h
parent6f0fff2a5f584cb944c1e9fde05de0fe6f453ba7 (diff)
2010-02-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --bt-lpd-interface option to specify the interface to use for Local Peer Discovery. LpdMessageDispatcher object now has its own socket. LpdMessageReceiver's socket is binded to multicast address to only receive multicast packets. * src/BtSetup.cc * src/LpdMessageDispatcher.cc * src/LpdMessageDispatcher.h * src/LpdMessageReceiver.cc * src/LpdMessageReceiver.h * src/LpdReceiveMessageCommand.cc * src/LpdReceiveMessageCommand.h * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/LpdMessageDispatcherTest.cc * test/LpdMessageReceiverTest.cc
Diffstat (limited to 'src/LpdMessageDispatcher.h')
-rw-r--r--src/LpdMessageDispatcher.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/LpdMessageDispatcher.h b/src/LpdMessageDispatcher.h
index e09c0fa4..bb6bad52 100644
--- a/src/LpdMessageDispatcher.h
+++ b/src/LpdMessageDispatcher.h
@@ -47,9 +47,9 @@ class Logger;
class LpdMessageDispatcher {
private:
+ SharedHandle<SocketCore> _socket;
std::string _infoHash;
uint16_t _port;
- SharedHandle<SocketCore> _socket;
std::string _multicastAddress;
uint16_t _multicastPort;
Time _timer;
@@ -60,9 +60,11 @@ public:
LpdMessageDispatcher
(const std::string& infoHash, uint16_t port,
const std::string& multicastAddr, uint16_t multicastPort,
- const SharedHandle<SocketCore>& socket,
time_t interval = 5*60);
+ // No throw
+ bool init(const std::string& localAddr, unsigned char ttl,unsigned char loop);
+
// Returns true if _timer reached announce interval, which is by
// default 5mins.
bool isAnnounceReady() const;