/////////////////////////////////////////////////////////////////////////////
// Name: sckipc.h
-// Purpose: documentation for wxTCPServer class
+// Purpose: interface of wxTCPServer
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/**
@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
{
message and this member is called. The application should derive a
member to intercept this message and return a connection object of
either the standard wxTCPConnection type, or of a user-derived type. If the
- topic is "STDIO'', the application may wish to refuse the connection.
+ topic is "STDIO", the application may wish to refuse the connection.
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
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.
};
+
/**
@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
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);
//@}
/**
*/
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);
//@}
/**
*/
virtual const void* OnRequest(const wxString& topic,
const wxString& item,
- size_t * size,
+ size_t* size,
wxIPCFormat format);
/**
*/
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);
//@}
/**
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);
/**
*/
bool StopAdvise(const wxString& item);
};
+