X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..231b9591aac1d6a507aa1ecfeb5f57e720003391:/interface/sckipc.h diff --git a/interface/sckipc.h b/interface/sckipc.h index 8319816fe7..4a3db2f305 100644 --- a/interface/sckipc.h +++ b/interface/sckipc.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: sckipc.h -// Purpose: documentation for wxTCPServer class +// Purpose: interface of wxTCPServer // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,18 +9,17 @@ /** @class wxTCPServer @wxheader{sckipc.h} - + A wxTCPServer object represents the server part of a client-server conversation. It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms. - + A DDE-based implementation for Windows is available using wxDDEServer. - + @library{wxnet} @category{FIXME} - - @seealso - wxTCPClient, wxTCPConnection, @ref overview_ipcoverview "IPC overview" + + @see wxTCPClient, wxTCPConnection, @ref overview_ipcoverview "IPC overview" */ class wxTCPServer : public wxObject { @@ -47,32 +46,32 @@ public: Under Unix, when a server is created the OnAcceptConnection message is always sent for standard input and output. */ - virtual wxConnectionBase * OnAcceptConnection(const wxString& topic); + virtual wxConnectionBase* OnAcceptConnection(const wxString& topic); }; + /** @class wxTCPClient @wxheader{sckipc.h} - + A wxTCPClient object represents the client part of a client-server conversation. It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms. - + A DDE-based implementation for Windows is available using wxDDEClient. - + To create a client which can communicate with a suitable server, you need to derive a class from wxTCPConnection and another from wxTCPClient. The custom wxTCPConnection class will intercept communications in a 'conversation' with a server, and the custom wxTCPServer is required so that a user-overridden wxTCPClient::OnMakeConnection member can return a wxTCPConnection of the required class, when a connection is made. - + @library{wxnet} @category{FIXME} - - @seealso - wxTCPServer, wxTCPConnection, @ref overview_ipcoverview "Interprocess + + @see wxTCPServer, wxTCPConnection, @ref overview_ipcoverview "Interprocess communications overview" */ class wxTCPClient : public wxObject @@ -92,22 +91,21 @@ public: the OnMakeConnection() member to return your own derived connection object. */ - wxConnectionBase * MakeConnection(const wxString& host, - const wxString& service, - const wxString& topic); + wxConnectionBase* MakeConnection(const wxString& host, + const wxString& service, + const wxString& topic); /** The type of wxTCPConnection returned from a MakeConnection() call can be altered by deriving the @b OnMakeConnection member to return your own derived connection object. By default, a wxTCPConnection object is returned. - The advantage of deriving your own connection class is that it will enable you to intercept messages initiated by the server, such as wxTCPConnection::OnAdvise. You may also want to store application-specific data in instances of the new class. */ - wxConnectionBase * OnMakeConnection(); + wxConnectionBase* OnMakeConnection(); /** Returns @true if this is a valid host name, @false otherwise. @@ -116,31 +114,31 @@ public: }; + /** @class wxTCPConnection @wxheader{sckipc.h} - + A wxTCPClient object represents the connection between a client and a server. It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms. - + A DDE-based implementation for Windows is available using wxDDEConnection. - + A wxTCPConnection object can be created by making a connection using a wxTCPClient object, or by the acceptance of a connection by a wxTCPServer object. The bulk of a conversation is controlled by calling members in a @b wxTCPConnection object or by overriding its members. - + An application should normally derive a new connection class from wxTCPConnection, in order to override the communication event handlers to do something interesting. - + @library{wxnet} @category{FIXME} - - @seealso - wxTCPClient, wxTCPServer, @ref overview_ipcoverview "Interprocess + + @see wxTCPClient, wxTCPServer, @ref overview_ipcoverview "Interprocess communications overview" */ class wxTCPConnection : public wxObject @@ -161,21 +159,21 @@ public: transactions. */ wxTCPConnection(); - wxTCPConnection(void* buffer, size_t size); + wxTCPConnection(void* buffer, size_t size); //@} //@{ /** Called by the server application to advise the client of a change in the data associated with the given item. Causes the client - connection's OnAdvise() + connection's OnAdvise() member to be called. Returns @true if successful. */ bool Advise(const wxString& item, const void* data, size_t size, wxIPCFormat format = wxIPC_PRIVATE); - bool Advise(const wxString& item, const char* data); - bool Advise(const wxString& item, const wchar_t* data); - bool Advise(const wxString& item, const wxString data); + bool Advise(const wxString& item, const char* data); + bool Advise(const wxString& item, const wchar_t* data); + bool Advise(const wxString& item, const wxString data); //@} /** @@ -199,9 +197,9 @@ public: */ bool Execute(const void* data, size_t size, wxIPCFormat format = wxIPC_PRIVATE); - bool Execute(const char* data); - bool Execute(const wchar_t* data); - bool Execute(const wxString data); + bool Execute(const char* data); + bool Execute(const wchar_t* data); + bool Execute(const wxString data); //@} /** @@ -247,7 +245,7 @@ public: */ virtual const void* OnRequest(const wxString& topic, const wxString& item, - size_t * size, + size_t* size, wxIPCFormat format); /** @@ -276,9 +274,9 @@ public: */ bool Poke(const wxString& item, const void* data, size_t size, wxIPCFormat format = wxIPC_PRIVATE); - bool Poke(const wxString& item, const char* data); - bool Poke(const wxString& item, const wchar_t* data); - bool Poke(const wxString& item, const wxString data); + bool Poke(const wxString& item, const char* data); + bool Poke(const wxString& item, const wchar_t* data); + bool Poke(const wxString& item, const wxString data); //@} /** @@ -287,7 +285,7 @@ public: character string (actually a pointer to the connection's buffer) if successful, @NULL otherwise. */ - const void* Request(const wxString& item, size_t * size, + const void* Request(const wxString& item, size_t* size, wxIPCFormat format = wxIPC_TEXT); /** @@ -305,3 +303,4 @@ public: */ bool StopAdvise(const wxString& item); }; +