10 #include <wx/snglinst.h>
14 #define IPC_SERVICE "4655"
17 #define IPC_HOST "localhost"
20 #define IPC_TOPIC "HATCHKEEPER_80"
32 virtual bool OnExecute(
const wxString& topic,
const void *data,
size_t size, wxIPCFormat format) wxOVERRIDE;
33 virtual bool DoExecute(
const void *data,
size_t size, wxIPCFormat format) wxOVERRIDE;
49 bool a = wxConnection::DoExecute(data, size, format);
51 wxLogMessage(wxT(
"Execute failed!"));
99 wxLogMessage(
"Unknown topic, connection refused");
115 bool Connect(
const wxString& sHost,
const wxString& sService,
const wxString& sTopic);
wxSingleInstanceChecker * h_checker
void ShowFrame()
Shows Splash Screen Then Shows And Raises Main Frame.
A localhost Client Used For Single Instance.
HatchConnection * GetConnection()
HatchClient()
Constructor.
wxConnectionBase * OnMakeConnection() wxOVERRIDE
Returns The Connection If Server Connected.
HatchConnection * h_connection
bool Connect(const wxString &sHost, const wxString &sService, const wxString &sTopic)
Atempts To Connect To Server Of Previous Instance.
void Disconnect()
Disconnect From Server.
This Class Shows The Main Window When A Server Connection Is Made.
virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format) wxOVERRIDE
For Client.
virtual bool OnExecute(const wxString &topic, const void *data, size_t size, wxIPCFormat format) wxOVERRIDE
For Server.
A localhost Server Used For Single Instance.
void Disconnect()
Disconnect Connection.
HatchConnection * h_connection
HatchConnection * GetConnection()
HatchServer()
Constructor.
virtual wxConnectionBase * OnAcceptConnection(const wxString &topic)
Checks To Make Sure This Is A Valid Connection.