summaryrefslogtreecommitdiff
path: root/src/DHTConnectionImpl.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-08-07 14:15:21 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-08-07 14:15:21 +0000
commit26d66923767581d63fdfc303525cddebf9125bde (patch)
tree97eb6054d697b53c7296adfaeaa43fb8013de3f2 /src/DHTConnectionImpl.h
parentbe7012272dbd029a7843df43466f4cd83e6fb9e3 (diff)
2010-08-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added IPv6 DHT. Added --dht-entry-porint6, --dht-file-path6, --dht-listen-addr6 and --enable-dht6 option. IPv6 DHT is disabled by default. To use IPv6 DHT, you need to use --enable-dht6 and specify a global unicast address to --dht-listen-addr6. IPv6 DHT is highly experimental. * src/BtSetup.cc * src/DHTAutoSaveCommand.cc * src/DHTAutoSaveCommand.h * src/DHTConnectionImpl.cc * src/DHTConnectionImpl.h * src/DHTEntryPointNameResolveCommand.cc * src/DHTFindNodeReplyMessage.cc * src/DHTFindNodeReplyMessage.h * src/DHTGetPeersMessage.cc * src/DHTGetPeersReplyMessage.cc * src/DHTGetPeersReplyMessage.h * src/DHTMessageFactory.h * src/DHTMessageFactoryImpl.cc * src/DHTMessageFactoryImpl.h * src/DHTMessageTracker.cc * src/DHTRegistry.cc * src/DHTRegistry.h * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableDeserializer.h * src/DHTRoutingTableSerializer.cc * src/DHTRoutingTableSerializer.h * src/DHTSetup.cc * src/DHTSetup.h * src/FtpConnection.cc * src/LpdMessageReceiver.cc * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/PeerInteractionCommand.cc * src/RequestGroup.cc * src/SocketCore.cc * src/SocketCore.h * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DHTConnectionImplTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTRoutingTableDeserializerTest.cc * test/DHTRoutingTableSerializerTest.cc * test/LpdMessageDispatcherTest.cc * test/MockDHTMessageFactory.h
Diffstat (limited to 'src/DHTConnectionImpl.h')
-rw-r--r--src/DHTConnectionImpl.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/DHTConnectionImpl.h b/src/DHTConnectionImpl.h
index 24099edd..7f0808fa 100644
--- a/src/DHTConnectionImpl.h
+++ b/src/DHTConnectionImpl.h
@@ -48,28 +48,33 @@ class DHTConnectionImpl:public DHTConnection {
private:
SharedHandle<SocketCore> socket_;
+ int family_;
+
Logger* logger_;
public:
- DHTConnectionImpl();
+ DHTConnectionImpl(int family);
virtual ~DHTConnectionImpl();
/**
- * Binds port. All number in ports are tried.
- * If successful, the binded port is assigned to port and returns true.
- * Otherwise return false and port is undefined in this case.
+ * Binds port. All number in ports are tried. If successful, the
+ * binded port is assigned to port and returns true. Otherwise
+ * return false and port is undefined in this case. If non-empty
+ * string addr is given, the socket is associated to the address.
*/
- bool bind(uint16_t& port, IntSequence& ports);
+ bool bind(uint16_t& port, const std::string& addr, IntSequence& ports);
/**
* Binds port. The port number specified by port is used to bind.
- * If successful, the binded port is assigned to port and returns true.
- * Otherwise return false and port is undefined in this case.
+ * If successful, the binded port is assigned to port and returns
+ * true. Otherwise return false and port is undefined in this case.
+ * If non-empty string addr is given, the socket is associated to
+ * the address.
*
* If you want to bind arbitrary port, give 0 as port and if successful,
* the binded port is assigned to port.
*/
- bool bind(uint16_t& port);
+ bool bind(uint16_t& port, const std::string& addr);
virtual ssize_t receiveMessage(unsigned char* data, size_t len,
std::string& host, uint16_t& port);