+
+ if ( testfunc )
+ m_tests.push_back(testfunc);
+
+ wxWakeUpIdle();
+}
+
+void MyClient::StartNextTestIfNecessary()
+{
+ if ( !m_tests.empty() )
+ {
+ MyClientTestFunc testfunc = m_tests.front();
+ m_tests.erase(m_tests.begin());
+ (this->*testfunc)();
+ }
+}
+
+void MyClient::TestRequest()
+{
+ size_t size;
+ m_connection->Request("Date");
+ m_connection->Request("Date+len", &size);
+ m_connection->Request("bytes[3]", &size, wxIPC_PRIVATE);
+}
+
+void MyClient::TestPoke()
+{
+ wxString s = wxDateTime::Now().Format();
+ m_connection->Poke("Date", s);
+ s = wxDateTime::Now().FormatTime() + " " + wxDateTime::Now().FormatDate();
+ m_connection->Poke("Date", (const char *)s.c_str(), s.length() + 1);
+ char bytes[3];
+ bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3';
+ m_connection->Poke("bytes[3]", bytes, 3, wxIPC_PRIVATE);
+}
+
+void MyClient::TestExecute()
+{
+ wxString s = "Date";
+ m_connection->Execute(s);
+ m_connection->Execute((const char *)s.c_str(), s.length() + 1);
+ char bytes[3];
+ bytes[0] = '1';
+ bytes[1] = '2';
+ bytes[2] = '3';
+ m_connection->Execute(bytes, WXSIZEOF(bytes));
+}
+
+void MyClient::TestStartAdvise()
+{
+ wxLogMessage("StartAdvise(\"something\")");
+ m_connection->StartAdvise("something");
+}
+
+void MyClient::TestStopAdvise()
+{
+ wxLogMessage("StopAdvise(\"something\")");
+ m_connection->StopAdvise("something");
+}
+
+void MyClient::TestDisconnect()
+{
+ Disconnect();