Finished up Relay Interface code to p3bitdht.

- RelayServers, Relay Parameters & Relay Mode supported.
 - Store configuration via p3config.
 - New interface code in p3bitdht_relay.cc
 - Updated external interface rsdht.cc



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4730 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-12-20 02:07:00 +00:00
parent 52e9a27f7b
commit e232b1d47d
8 changed files with 481 additions and 61 deletions

View file

@ -83,7 +83,7 @@ virtual int dhtInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std::
p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
UdpStack *udpstack, std::string bootstrapfile)
:pqiNetAssistConnect(id, cb), mNetMgr(nm), dhtMtx("p3BitDht")
:p3Config(CONFIG_TYPE_BITDHT), pqiNetAssistConnect(id, cb), mNetMgr(nm), dhtMtx("p3BitDht")
{
mDhtStunner = NULL;
mProxyStunner = NULL;
@ -133,6 +133,7 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
p3BdCallback *bdcb = new p3BdCallback(this);
mUdpBitDht->addCallback(bdcb);
#if 0
/* enable all modes */
/* Switched to only Proxy Mode - as Direct Connections can be unreliable - as they share the UDP with the DHT....
* We'll get these working properly and then if necessary get Direct further tested.
@ -143,6 +144,9 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
BITDHT_CONNECT_MODE_PROXY,
BITDHT_CONNECT_OPTION_AUTOPROXY);
#endif
setupRelayDefaults();
}
p3BitDht::~p3BitDht()