Contents Up Previous Next

wxConnection is-a wxObject


Not yet tested.

Connection overview

A wxConnection object has no creation function, since it is implicitly created when a connection is requested (one object at each side of the connection).

A connection object is used for initiating DDE commands and requests using functions such as execute, and it also has message handlers associated with it to respond to commands from the other side of the connection.

wxConnection service-name
wxConnection advise
wxConnection execute
wxConnection disconnect
wxConnection poke
wxConnection request
wxConnection start-advise
wxConnection stop-advise
wxConnection on-advise
wxConnection on-execute
wxConnection on-poke
wxConnection on-request
wxConnection on-start-advise
wxConnection on-stop-advise


wxConnection service-name

string service-name

Service name variable.


wxConnection advise

bool ( advise string item string data)

Called by a server application to pass data to a client (for example, when a spreadsheet cell has been updated, and the client is interested in this value).

item is the name of the item, and data is a string representing the item's data.

Returns TRUE if successful, FALSE otherwise.


wxConnection execute

bool ( wxConnection execute string data)

Called by a client application to execute a command in the server. Note there is no item in this command.

data is a string representing the item's data.

Returns TRUE if successful, FALSE otherwise.

To get a result from a server, you need to call request explicitly, since execute doesn't return data.


wxConnection disconnect

bool ( disconnect)

Called by a client or server application to terminate this connection. After this call, the connection object is no longer valid.

Returns TRUE if successful, FALSE otherwise.


wxConnection poke

bool ( poke string item string data)

Called by a client application to poke data into the server.

item is the name of the item, and data is a string representing the item's data.

Returns TRUE if successful, FALSE otherwise.


wxConnection request

string ( request string item)

Called by a client application to request data from a server.

item is the name of the requested data item.

Returns a string representing the data if successful, the empty string otherwise.


wxConnection start-advise

bool ( start-advise string item)

Called by a client application to indicate interest in a particular piece of data in a server. The client connection should then recieve OnAdvise messages when the data is updated in the server.

item is the name of the data item of interest.

Returns TRUE if the advise loop is allowed, FALSE otherwise.


wxConnection stop-advise

bool ( stop-advise string item)

Called by a client application to indicate a termination of interest in a particular piece of data in a server.

item is the name of the data item of interest.

Returns TRUE if successful, FALSE otherwise.


wxConnection on-advise

bool ( on-advise string topic string item string data)

Called on the client side of the connection, when the server side sends an advise message. Used for advising the client of a change in server data. Override this to intercept such messages.


wxConnection on-execute

bool ( on-execute string topic string data)

Called on the server side of the connection, when the client side sends an execute message. Used for implementing commands on the server side. Override this to implement command execution; you might wish to store the last result(s) to be returned when the client sends a request message.


wxConnection on-poke

bool ( on-poke string topic string item string data)

Called on the server side of the connection, when the client side sends a poke message. Used for poking data into a server. Override this to intercept such messages.


wxConnection on-request

string ( on-request string topic string item)

Called on the server side of the connection, when the client side sends a request message. Used for getting information from a server. Override this to intercept such messages and return data back to the client.


wxConnection on-start-advise

bool ( on-start-advise string topic string item)

Called on the server side of the connection, when the client side wishes to start an advise loop for the given topic and item. The server should respond with TRUE to accept this advise loop, FALSE otherwise.


wxConnection on-stop-advise

bool ( on-stop-advise string topic string item)

Called on the server side of the connection, when the client side wishes to stop an advise loop for the given topic and item. The server should respond with TRUE to terminate this advise loop, FALSE otherwise.