Receiving data from endpoints via a callback

An endpoint can deliver data as it is received to one or more functions or class methods within your application.

Conceptually, this is the delivery mechanism that is probably most appropriate for datagram delivery such as UDP/IP.

To receive data from an endpoint via callback you need to:

  1. Create the function or class method that will receive the data from the endpoint.
  2. Create the sigc++ slot that will receive the data from the endpoint.
  3. Connect the slot to the endpoint using either the connect_to_data() method if your function or method accepts conexus::Data as its first parameter or the connect_to_const_data() method if your function or method accepts conexus::CData as the first parameter.

The following image illustrates the sequence of operations in receiving data via callbacks.

callback.png

Sequence of operations required to receive data via a callback mechanism.


Generated on Sun Aug 6 12:16:57 2006 by  doxygen 1.4.6