wxRuby Documentation Home

# Wx::DDEClient

A DDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation.

To create a client which can communicate with a suitable server,
you need to derive a class from DDEConnection and another from DDEClient.
The custom DDEConnection class will intercept communications in
a `conversation’ with a server, and the custom DDEServer is required
so that a user-overridden DDEClient#on_make_connection member can return
a DDEConnection of the required class, when a connection is made.

This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using TCPClient.

## Derived from

ClientBase

Object

## See also

DDEServer, DDEConnection,
Interprocess communications overview

## Methods

- DDEClient.new
- DDEClient#make_connection
- DDEClient#on_make_connection
- DDEClient#valid_host

### DDEClient.new

### DDEClient#make_connection

ConnectionBase make_connection(%(arg-type)String% host, String service, String 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 DDEConnection object will be returned.
The type of DDEConnection returned can be altered by overriding
the DDEClient#on_make_connection member to return your own
derived connection object.

### DDEClient#on_make_connection

ConnectionBase on_make_connection()

The type of DDEConnection returned from a DDEClient#make_connection call can
be altered by deriving the OnMakeConnection member to return your
own derived connection object. By default, a DDEConnection
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 DDEConnection#on_advise. You may also want to
store application-specific data in instances of the new class.

### DDEClient#valid_host

Boolean valid_host(%(arg-type)String% host)

Returns if this is a valid host name, otherwise. This always
returns under MS Windows.

[This page automatically generated from the Textile source at 2023-06-09 00:45:29 +0000]