More control/ refactoring
This commit is contained in:
parent
e22fae2397
commit
edff13dcae
5 changed files with 84 additions and 96 deletions
|
@ -38,12 +38,6 @@
|
|||
#include "../node/NonCopyable.hpp"
|
||||
#include "../node/Thread.hpp"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define ZT_IPC_ENDPOINT_BASE "\\\\.\\pipe\\ZeroTierOne-"
|
||||
#else
|
||||
#define ZT_IPC_ENDPOINT_BASE "/tmp/.ZeroTierOne-"
|
||||
#endif
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
class Node;
|
||||
|
@ -65,19 +59,11 @@ public:
|
|||
|
||||
~NodeControlService();
|
||||
|
||||
// Background thread waits for node to initialize, then creates IpcListener
|
||||
// Background thread waits for node to initialize, then creates IpcListener and
|
||||
// terminates. It also terminates on delete if it hasn't bootstrapped yet.
|
||||
void threadMain()
|
||||
throw();
|
||||
|
||||
/**
|
||||
* Load (or generate) the authentication token
|
||||
*
|
||||
* @param path Full path to authtoken.secret
|
||||
* @param generateIfNotFound If true, generate and save if not found or readable
|
||||
* @return Authentication token or empty string on failure
|
||||
*/
|
||||
static std::string readOrCreateAuthtoken(const char *path,bool generateIfNotFound);
|
||||
|
||||
private:
|
||||
static void _CBcommandHandler(void *arg,IpcConnection *ipcc,IpcConnection::EventType event,const char *commandLine);
|
||||
void _doCommand(IpcConnection *ipcc,const char *commandLine);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue