return true;
// Send the the disconnect message to the peer.
m_codeco->Write8(IPC_DISCONNECT);
- m_sock->Notify(false);
- m_sock->Close();
+
+ if ( m_sock )
+ {
+ m_sock->Notify(false);
+ m_sock->Close();
+ }
+
SetConnected(false);
return true;
}
}
-bool wxTCPConnection::Poke (const wxString& item, wxChar *data, int size, wxIPCFormat format)
+bool wxTCPConnection::Poke (const wxString& item, const wxChar *data, int size, wxIPCFormat format)
{
if (!m_sock->IsConnected())
return false;
// Calls that SERVER can make
bool wxTCPConnection::Advise (const wxString& item,
- wxChar *data, int size, wxIPCFormat format)
+ const wxChar *data, int size, wxIPCFormat format)
{
if (!m_sock->IsConnected())
return false;
format = (wxIPCFormat)codeci->Read8();
int user_size = -1;
- wxChar *user_data = connection->OnRequest (topic_name, item, &user_size, format);
+ const wxChar *user_data = connection->OnRequest (topic_name, item, &user_size, format);
if (user_data)
{