// Copyright: (c) Julian Smart 1993
// (c) Guilhem Lavaux 1997, 1998
// (c) 2000 Guillermo Rodriguez <guille@iies.es>
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ==========================================================================
// headers
// --------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "sckipc.h"
#endif
GetAddressFromName(const wxString& serverName, const wxString& host = _T(""))
{
// we always use INET sockets under non-Unix systems
-#if defined(__UNIX__) && !defined(__WXMAC__)
+#if defined(__UNIX__) && !defined(__WXMAC__) && !defined(__WINE__)
// under Unix, if the server name looks like a path, create a AF_UNIX
// socket instead of AF_INET one
if ( serverName.Find(_T('/')) != wxNOT_FOUND )
void Server_OnRequest(wxSocketEvent& event);
DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxTCPEventHandler)
};
enum
m_codeco->Write8(IPC_DISCONNECT);
m_sock->Notify(FALSE);
m_sock->Close();
- SetConnected(false);
+ SetConnected(FALSE);
return TRUE;
}
return TRUE;
}
-char *wxTCPConnection::Request (const wxString& item, int *size, wxIPCFormat format)
+wxChar *wxTCPConnection::Request (const wxString& item, int *size, wxIPCFormat format)
{
if (!m_sock->IsConnected())
return NULL;
if (!connection)
return;
- int msg = 0;
wxDataInputStream *codeci;
wxDataOutputStream *codeco;
wxSocketStream *sockstrm;
codeci = connection->m_codeci;
codeco = connection->m_codeco;
sockstrm = connection->m_sockstrm;
- msg = codeci->Read8();
+ int msg = codeci->Read8();
switch (msg)
{
case IPC_EXECUTE:
{
- char *data;
+ wxChar *data;
size_t size;
wxIPCFormat format;
}
case IPC_ADVISE:
{
- char *data;
+ wxChar *data;
size_t size;
wxIPCFormat format;
format = (wxIPCFormat)codeci->Read8();
int user_size = -1;
- char *user_data = connection->OnRequest (topic_name, item, &user_size, format);
+ wxChar *user_data = connection->OnRequest (topic_name, item, &user_size, format);
if (user_data)
{
codeco->Write8(IPC_REQUEST_REPLY);
if (user_size == -1)
- user_size = strlen(user_data) + 1; // includes final NUL
+ user_size = wxStrlen(user_data) + 1; // includes final NUL
codeco->Write32(user_size);
sockstrm->Write(user_data, user_size);
{
sock->Notify(FALSE);
sock->Close();
- connection->SetConnected(false);
+ connection->SetConnected(FALSE);
connection->OnDisconnect();
break;
}
// wxTCPEventHandlerModule (private class)
// --------------------------------------------------------------------------
-class WXDLLEXPORT wxTCPEventHandlerModule: public wxModule
+class wxTCPEventHandlerModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxTCPEventHandlerModule)