aboutsummaryrefslogtreecommitdiff
path: root/ipc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ipc.cpp')
-rw-r--r--ipc.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/ipc.cpp b/ipc.cpp
new file mode 100644
index 0000000000..86e57674e2
--- /dev/null
+++ b/ipc.cpp
@@ -0,0 +1,33 @@
+/*
+ * Inter-process calling functionality
+ */
+
+#include "headers.h"
+
+wxConnectionBase * CServer::OnAcceptConnection (const wxString &topic) {
+ return new CServerConnection;
+}
+
+wxConnectionBase * CClient::OnMakeConnection () {
+ return new CClientConnection;
+}
+
+// For request based handling
+const void * CServerConnection::OnRequest (const wxString &topic, const wxString &item, size_t *size, wxIPCFormat format) {
+ const char * output;
+
+ if (item == "blockamount") {
+ stringstream stream;
+ stream << nBestHeight + 1;
+ output = stream.str().c_str();
+ }
+ else
+ output = "Unknown identifier";
+
+ return output;
+}
+
+// For event based handling
+bool CClientConnection::OnAdvise (const wxString &topic, const wxString &item, const void *data, size_t size, wxIPCFormat format) {
+ return false;
+} \ No newline at end of file