Running the C Samples

Build and run the sample subscribe and publish programs to verify product operation.

Prerequisites

This task requires that the realm server is running, and that you have arranged two terminal windows with the appropriate environment.

Procedure

  1. Copy the samples to your home directory, or another working location.
    cd $HOME
    cp -r /opt/tibco/ftl/ftl_release/samples/ ./samples
    cd samples/src/c
  2. Compile the samples.
    make TIBFTL_DIR=/opt/tibco/ftl/ftl_release
  3. Start the subscriber program in the background.
    cd samples/src/c
    ./tibrecv -c 10 http://localhost:8080 &
  4. In the second terminal window, start the publisher program.
    cd samples/src/c
    ./tibsend -c 10 http://localhost:8080
    The publisher program sends 10 messages, and the subscriber program receives and prints them. Then both programs exit.