X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75ed1d15d0d866cac78f7c0da176db8dd5288bc8..c17bcb844883451b564446bf7843e7b3f862fe48:/src/common/sckipc.cpp diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 718211b7dc..5528d2eca3 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -20,6 +20,8 @@ #pragma hdrstop #endif +#if wxUSE_SOCKETS + #ifndef WX_PRECOMP #endif @@ -188,6 +190,10 @@ wxTCPConnection::wxTCPConnection (void) { } +wxTCPConnection::wxTCPConnection(char *buffer, int size) +{ +} + wxTCPConnection::~wxTCPConnection (void) { wxDELETE(m_sock); @@ -211,7 +217,7 @@ bool wxTCPConnection::Disconnect (void) return TRUE; } -bool wxTCPConnection::Execute (char *data, int size, wxDataFormat format) +bool wxTCPConnection::Execute (wxChar *data, int size, wxIPCFormat format) { if (!m_sock->IsConnected()) return FALSE; @@ -229,7 +235,7 @@ bool wxTCPConnection::Execute (char *data, int size, wxDataFormat format) return TRUE; } -char *wxTCPConnection::Request (const wxString& item, int *size, wxDataFormat format) +char *wxTCPConnection::Request (const wxString& item, int *size, wxIPCFormat format) { if (!m_sock->IsConnected()) return NULL; @@ -258,7 +264,7 @@ char *wxTCPConnection::Request (const wxString& item, int *size, wxDataFormat fo } } -bool wxTCPConnection::Poke (const wxString& item, char *data, int size, wxDataFormat format) +bool wxTCPConnection::Poke (const wxString& item, wxChar *data, int size, wxIPCFormat format) { if (!m_sock->IsConnected()) return FALSE; @@ -314,7 +320,7 @@ bool wxTCPConnection::StopAdvise (const wxString& item) // Calls that SERVER can make bool wxTCPConnection::Advise (const wxString& item, - char *data, int size, wxDataFormat format) + wxChar *data, int size, wxIPCFormat format) { if (!m_sock->IsConnected()) return FALSE; @@ -358,9 +364,9 @@ void Client_OnRequest(wxSocketBase& sock, wxSocketBase::wxRequestEvent evt, case IPC_EXECUTE: { char *data; size_t size; - wxDataFormat format; + wxIPCFormat format; - format = (wxDataFormat)codeci->Read8(); + format = (wxIPCFormat)codeci->Read8(); size = codeci->Read32(); data = new char[size]; codeci->Read(data, size); @@ -373,10 +379,10 @@ void Client_OnRequest(wxSocketBase& sock, wxSocketBase::wxRequestEvent evt, case IPC_ADVISE: { char *data; size_t size; - wxDataFormat format; + wxIPCFormat format; item = codeci->ReadString(); - format = (wxDataFormat)codeci->Read8(); + format = (wxIPCFormat)codeci->Read8(); size = codeci->Read32(); data = new char[size]; codeci->Read(data, size); @@ -409,14 +415,14 @@ void Client_OnRequest(wxSocketBase& sock, wxSocketBase::wxRequestEvent evt, break; } case IPC_POKE: { - wxDataFormat format; + wxIPCFormat format; size_t size; - char *data; + wxChar *data; item = codeci->ReadString(); - format = (wxDataFormat)codeci->Read8(); + format = (wxIPCFormat)codeci->Read8(); size = codeci->Read32(); - data = new char[size]; + data = new wxChar[size]; codeci->Read(data, size); connection->OnPoke (topic_name, item, data, size, format); @@ -426,10 +432,10 @@ void Client_OnRequest(wxSocketBase& sock, wxSocketBase::wxRequestEvent evt, break; } case IPC_REQUEST: { - wxDataFormat format; + wxIPCFormat format; item = codeci->ReadString(); - format = (wxDataFormat)codeci->Read8(); + format = (wxIPCFormat)codeci->Read8(); int user_size = -1; char *user_data = connection->OnRequest (topic_name, item, &user_size, format); @@ -512,3 +518,6 @@ void Server_OnRequest(wxSocketServer& server, } } } + +#endif + // wxUSE_SOCKETS