mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
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:
parent
2048bb5e47
commit
4d2175636e
9 changed files with 1488 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue