mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
Added External DHT Interface to display Connection Information.
* added retroshare/rsdht.h * extended p3bitdht to provide RsDht interface. (p3bitdht_interface.cc) * added UdpRelay to networking stack. * started expansion of p3bitdht to handle connections. * added <string> header to rsthreads. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4399 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5e691935fd
commit
11cc3fce04
7 changed files with 479 additions and 8 deletions
|
@ -29,6 +29,9 @@
|
|||
#include "bitdht/bdstddht.h"
|
||||
#include "pqi/p3connmgr.h"
|
||||
|
||||
#include "tcponudp/udprelay.h"
|
||||
#include "tcponudp/udpstunner.h"
|
||||
|
||||
#include <openssl/sha.h>
|
||||
|
||||
|
||||
|
@ -37,6 +40,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/**** EXTERNAL INTERFACE DHT POINTER *****/
|
||||
RsDht *rsDht = NULL;
|
||||
|
||||
class p3BdCallback: public BitDhtCallback
|
||||
{
|
||||
public:
|
||||
|
@ -74,6 +80,10 @@ virtual int dhtConnectCallback(const bdId *srcId, const bdId *proxyId, const bdI
|
|||
p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, UdpStack *udpstack, std::string bootstrapfile)
|
||||
:pqiNetAssistConnect(id, cb), dhtMtx("p3BitDht")
|
||||
{
|
||||
mDhtStunner = NULL;
|
||||
mProxyStunner = NULL;
|
||||
mRelay = NULL;
|
||||
|
||||
std::string dhtVersion = "RS51"; // should come from elsewhere!
|
||||
bdNodeId ownId;
|
||||
|
||||
|
@ -122,6 +132,15 @@ p3BitDht::~p3BitDht()
|
|||
delete mUdpBitDht;
|
||||
}
|
||||
|
||||
|
||||
void p3BitDht::setupConnectBits(UdpStunner *dhtStunner, UdpStunner *proxyStunner, UdpRelayReceiver *relay)
|
||||
{
|
||||
mDhtStunner = dhtStunner;
|
||||
mProxyStunner = proxyStunner;
|
||||
mRelay = relay;
|
||||
}
|
||||
|
||||
|
||||
void p3BitDht::start()
|
||||
{
|
||||
#ifdef DEBUG_BITDHT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue