mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-02 21:23:08 -04:00
Merge pull request #1520 from G10h4ck/broadcast_discovery
Broadcast Domain friends IP:Port Discovery
This commit is contained in:
commit
9a7ce1ae72
25 changed files with 1118 additions and 108 deletions
libretroshare/src/rsserver
|
@ -39,6 +39,9 @@ int rsserverzone = 101;
|
|||
|
||||
#include "util/rsdebug.h"
|
||||
|
||||
#include "retroshare/rsevents.h"
|
||||
#include "services/rseventsservice.h"
|
||||
|
||||
|
||||
/****
|
||||
#define DEBUG_TICK 1
|
||||
|
@ -81,6 +84,12 @@ RsServer::RsServer() :
|
|||
coreMutex("RsServer"), mShutdownCallback([](int){}),
|
||||
coreReady(false)
|
||||
{
|
||||
{
|
||||
RsEventsService* tmpRsEvtPtr = new RsEventsService();
|
||||
rsEvents.reset(tmpRsEvtPtr);
|
||||
startServiceThread(tmpRsEvtPtr, "RsEventsService");
|
||||
}
|
||||
|
||||
// This is needed asap.
|
||||
//
|
||||
mNotify = new p3Notify() ;
|
||||
|
|
|
@ -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
|
||||
|
@ -1454,6 +1459,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 ;
|
||||
|
@ -1841,10 +1852,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