mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
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:
11
src/net.h
11
src/net.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user