mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
Changes to support Relays.
* added p3BitDht::addKnownNode() so that DhtIds can be used instead of SslIds. * switched from bdStdDht() functions to use bdModDht(). * made DhtFunctions a class variable. * added function to modify NodePerBucket() parameter. * Bugfix for LinkType. peerConnectAddress.flags was not initialised. * Extra debugging of LinkType data (use LINKMGR_DEBUG_LINKTYPE). * cleaned up udprelay output. * Added Compile Rules to libretroshare.pro for building LocalNet Testing Version. (testnetwork) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fe955c9a4f
commit
96c9071920
7 changed files with 131 additions and 20 deletions
|
@ -120,7 +120,8 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
|
|||
#endif
|
||||
|
||||
/* standard dht behaviour */
|
||||
bdDhtFunctions *stdfns = new bdStdDht();
|
||||
//bdDhtFunctions *stdfns = new bdStdDht();
|
||||
mDhtFns = new bdModDht();
|
||||
|
||||
#ifdef DEBUG_BITDHT
|
||||
std::cerr << "p3BitDht() startup ... creating UdpBitDht";
|
||||
|
@ -128,7 +129,7 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
|
|||
#endif
|
||||
|
||||
/* create dht */
|
||||
mUdpBitDht = new UdpBitDht(udpstack, &mOwnDhtId, dhtVersion, bootstrapfile, stdfns);
|
||||
mUdpBitDht = new UdpBitDht(udpstack, &mOwnDhtId, dhtVersion, bootstrapfile, mDhtFns);
|
||||
udpstack->addReceiver(mUdpBitDht);
|
||||
|
||||
/* setup callback to here */
|
||||
|
@ -170,6 +171,12 @@ void p3BitDht::setupPeerSharer(pqiNetAssistPeerShare *sharer)
|
|||
mPeerSharer = sharer;
|
||||
}
|
||||
|
||||
/* Tweak the DHT Parameters */
|
||||
void p3BitDht::modifyNodesPerBucket(uint16_t count)
|
||||
{
|
||||
bdModDht *modFns = (bdModDht *) mDhtFns;
|
||||
modFns->setNodesPerBucket(count);
|
||||
}
|
||||
|
||||
/* Support for Outsourced Relay Handling */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue