X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4ada568223b79c8a5769cc351c36a8e2ccd7841..07818da861a28c5f20919766756a6d94834455fe:/include/wx/sckipc.h diff --git a/include/wx/sckipc.h b/include/wx/sckipc.h index 8ca86b2ae2..08879516f0 100644 --- a/include/wx/sckipc.h +++ b/include/wx/sckipc.h @@ -52,19 +52,20 @@ class wxTCPClient; class wxTCPConnection: public wxConnectionBase { DECLARE_DYNAMIC_CLASS(wxTCPConnection) - + protected: wxSocketBase *m_sock; wxSocketStream *m_sockstrm; - wxDataStream *m_codec; + wxDataInputStream *m_codeci; + wxDataOutputStream *m_codeco; wxString m_topic; friend class wxTCPServer; friend class wxTCPClient; friend void Client_OnRequest(wxSocketBase&, - wxSocketBase::wxRequestEvent, char *); + wxSocketNotify, char *); friend void Server_OnRequest(wxSocketServer&, - wxSocketBase::wxRequestEvent, char *); + wxSocketNotify, char *); public: wxTCPConnection(char *buffer, int size); @@ -72,18 +73,18 @@ public: virtual ~wxTCPConnection(); // Calls that CLIENT can make - bool Execute(char *data, int size = -1, - wxDataFormat format = wxDF_TEXT); + bool Execute(const wxChar *data, int size = -1, + wxIPCFormat format = wxIPC_TEXT); char *Request(const wxString& item, int *size = NULL, - wxDataFormat format = wxDF_TEXT); - bool Poke(const wxString& item, char *data, int size = -1, - wxDataFormat format = wxDF_TEXT); + wxIPCFormat format = wxIPC_TEXT); + bool Poke(const wxString& item, wxChar *data, int size = -1, + wxIPCFormat format = wxIPC_TEXT); bool StartAdvise(const wxString& item); bool StopAdvise(const wxString& item); // Calls that SERVER can make - bool Advise(const wxString& item, char *data, int size = -1, - wxDataFormat format = wxDF_TEXT); + bool Advise(const wxString& item, wxChar *data, int size = -1, + wxIPCFormat format = wxIPC_TEXT); // Calls that both can make bool Disconnect(); @@ -93,6 +94,9 @@ public: // To enable the compressor void Compress(bool on); +private: + // to prevent virtual function hiding warnings + virtual bool Execute(const wxString& str) { return(wxConnectionBase::Execute(str)); }; }; class wxTCPServer: public wxServerBase @@ -104,9 +108,9 @@ public: wxTCPServer(); virtual ~wxTCPServer(); - + // Returns FALSE if can't create server (e.g. port number is already in use) - virtual bool Create(const wxString& server_name); + virtual bool Create(const wxString& server_name); virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); }; @@ -114,7 +118,7 @@ class wxTCPClient: public wxClientBase { DECLARE_DYNAMIC_CLASS(wxTCPClient) -public: +public: wxTCPClient(); virtual ~wxTCPClient(); @@ -124,7 +128,7 @@ public: virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic); - + // Tailor this to return own connection. virtual wxConnectionBase *OnMakeConnection(); };