mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-04 12:49:28 -04:00
Initial work on Broadcast Domain Discovery
Discover peers on the same broadcast domain/LAN Implements own node announcement Implements others announcement listening Implements API to get notifiend when other nodes get discovered Implements API to get discovered nodes Add discovered peer locator to rsPeers if it is already friend Yet a bunch of things to do to take full advantage of this new implementation
This commit is contained in:
parent
276328dd91
commit
7b38c1c75a
15 changed files with 583 additions and 70 deletions
libretroshare/src/rsserver
|
@ -34,7 +34,7 @@
|
|||
|
||||
#ifdef __ANDROID__
|
||||
# include <QFile> // To install bdboot.txt
|
||||
# include <QString> // for String::fromStdString(...)
|
||||
# include <QString> // for QString::fromStdString(...)
|
||||
#endif
|
||||
|
||||
#include "util/argstream.h"
|
||||
|
@ -98,6 +98,11 @@ RsDht *rsDht = NULL ;
|
|||
# include "jsonapi/jsonapi.h"
|
||||
#endif
|
||||
|
||||
#ifdef RS_BROADCAST_DISCOVERY
|
||||
# include "retroshare/rsbroadcastdiscovery.h"
|
||||
# include "services/broadcastdiscoveryservice.h"
|
||||
#endif // def RS_BROADCAST_DISCOVERY
|
||||
|
||||
// #define GPG_DEBUG
|
||||
// #define AUTHSSL_DEBUG
|
||||
// #define FIM_DEBUG
|
||||
|
@ -1462,6 +1467,12 @@ int RsServer::StartupRetroShare()
|
|||
mHistoryMgr, *mGxsTrans );
|
||||
mStatusSrv = new p3StatusService(serviceCtrl);
|
||||
|
||||
#ifdef RS_BROADCAST_DISCOVERY
|
||||
rsBroadcastDiscovery.reset(new BroadcastDiscoveryService(*rsPeers));
|
||||
BroadcastDiscoveryService& tBroadcastDiscoveryService =
|
||||
static_cast<BroadcastDiscoveryService&>(*rsBroadcastDiscovery);
|
||||
#endif // def RS_BROADCAST_DISCOVERY
|
||||
|
||||
#ifdef ENABLE_GROUTER
|
||||
p3GRouter *gr = new p3GRouter(serviceCtrl,mGxsIdService) ;
|
||||
rsGRouter = gr ;
|
||||
|
@ -1863,10 +1874,14 @@ int RsServer::StartupRetroShare()
|
|||
# ifdef RS_GXS_TRANS
|
||||
startServiceThread(mGxsTrans, "gxs trans");
|
||||
startServiceThread(gxstrans_ns, "gxs trans ns");
|
||||
# endif // RS_GXS_TRANS
|
||||
# endif // def RS_GXS_TRANS
|
||||
|
||||
#endif // RS_ENABLE_GXS
|
||||
|
||||
#ifdef RS_BROADCAST_DISCOVERY
|
||||
startServiceThread(&tBroadcastDiscoveryService, "Broadcast Discovery");
|
||||
#endif // def RS_BROADCAST_DISCOVERY
|
||||
|
||||
ftserver->StartupThreads();
|
||||
ftserver->ResumeTransfers();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue