aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorEric Lombrozo <elombrozo@gmail.com>2013-01-07 08:07:51 -0800
committerEric Lombrozo <elombrozo@gmail.com>2013-06-05 20:36:10 -0700
commit663224c2324d64134f8587fe77d1d787c0353b20 (patch)
treedb06935be9f6e57b6478e866b63f72b3a5934d81 /src/net.h
parent4751d07efdc3924a005bbe61b358d320f0c710af (diff)
downloadbitcoin-663224c2324d64134f8587fe77d1d787c0353b20.tar.xz
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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 6f7bea9394..1c8c99aa3b 100644
--- a/src/net.h
+++ b/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