Removed net.cpp's dependency on init.h.

Added explicit include of main.h in init.cpp, changed include of init.h to include of main.h in net.cpp.

Added function registration for net.cpp in init.cpp's network initialization.

Removed protocol.cpp's dependency on main.h.

TODO: Remove main.h include in net.cpp.
This commit is contained in:
Eric Lombrozo
2013-01-07 08:07:51 -08:00
parent 4751d07efd
commit 663224c232
4 changed files with 42 additions and 5 deletions

View File

@@ -45,6 +45,17 @@ void StartNode(boost::thread_group& threadGroup);
bool StopNode();
void SocketSendData(CNode *pnode);
//
// Handlers that require registration
//
typedef bool (*ProcessMessagesHandler)(CNode* pfrom);
typedef bool (*SendMessagesHandler)(CNode* pto, bool fSendTrickle);
typedef void (*StartShutdownHandler)();
void SetProcessMessagesHandler(ProcessMessagesHandler handler);
void SetSendMessagesHandler(SendMessagesHandler handler);
void SetStartShutdownHandler(StartShutdownHandler handler);
enum
{
LOCAL_NONE, // unknown