Interprocess communications overview
A wxClient object represents the client part of a client-server DDE (Dynamic Data Exchange) conversation (available in both Windows and UNIX).
To create a client which can communicate with a suitable server, you need to derive a class from wxConnection and another from wxClient. The custom wxConnection class will intercept communications in a 'conversation' with a server, and the custom wxServer is required so that a user-overriden wxClient::OnMakeConnection member can return a wxConnection of the required class, when a connection is made.
See also wxServer, wxConnection, the chapter on interprocess communication in the user manual, and the programs in samples/ipc.
wxClient::wxClient
wxClient::MakeConnection
wxClient::OnMakeConnection
wxClient::ValidHost
void wxClient(void)
Constructs a client object.
wxConnection * MakeConnection(char *host, char *service, char *topic)
Tries to make a connection with a server specified by the host (machine name under UNIX, ignored under Windows), service name (must contain an integer port number under UNIX), and topic string. If the server allows a connection, a wxConnection object will be returned. The type of wxConnection returned can be altered by overriding the wxClient::OnMakeConnection member to return your own derived connection object.
wxConnection * OnMakeConnection(void)
The type of wxConnection returned from a wxClient::MakeConnection call can be altered by deriving the OnMakeConnection member to return your own derived connection object. By default, an ordinary wxConnection 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 wxConnection::OnAdvise. You may also want to store application-specific data in instances of the new class.
Bool ValidHost(char *host)
Returns TRUE if this is a valid host name, FALSE otherwise. This always returns TRUE under MS Windows.