diff options
author | Eric Lombrozo <elombrozo@gmail.com> | 2013-01-07 08:07:51 -0800 |
---|---|---|
committer | Eric Lombrozo <elombrozo@gmail.com> | 2013-06-05 20:36:10 -0700 |
commit | 663224c2324d64134f8587fe77d1d787c0353b20 (patch) | |
tree | db06935be9f6e57b6478e866b63f72b3a5934d81 /src/net.h | |
parent | 4751d07efdc3924a005bbe61b358d320f0c710af (diff) |
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.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |