blob: 86e57674e2a32b7712fc06c18154cc112530cc14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
}
|