Added basic ZeroConf interface.

- registers oneself, browses and resolves services.
 - Lots still TODO:
	- parse TxtRecords.
	- Track peers.
	- feedback to libretroshare
	- etc, etc.
Enabled ZeroConf in libretroshare.pro & rsinit.cc. Compiles and runs on OSX.
Added RelayHandler to Dht, to enable external control of Relays.
Marked pqiAssist Interface for changes... will be revamped with ZeroConf.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-12-13 16:19:37 +00:00
parent 2048bb5e47
commit 4d2175636e
9 changed files with 1488 additions and 19 deletions

View file

@ -91,6 +91,8 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
mPeerSharer = NULL;
mRelayHandler = NULL;
std::string dhtVersion = "RS51"; // should come from elsewhere!
mOwnRsId = id;
@ -162,6 +164,23 @@ void p3BitDht::setupPeerSharer(pqiNetAssistPeerShare *sharer)
mPeerSharer = sharer;
}
/* Support for Outsourced Relay Handling */
void p3BitDht::installRelayHandler(p3BitDhtRelayHandler *handler)
{
/* The Handler is mutex protected, as its installation can occur when the dht is already running */
RsStackMutex stack(dhtMtx); /********* LOCKED *********/
mRelayHandler = handler;
}
UdpRelayReceiver *p3BitDht::getRelayReceiver()
{
return mRelay;
}
void p3BitDht::start()
{
#ifdef DEBUG_BITDHT