Sample Configuration 1: Default with tibsend and tibrecv

This first example illustrates the simplest configuration for communication. The sample applications tibsend and tibrecv use the default configuration definitions.

The default application definition and default transport definition provide an infrastructure for programs that use a single endpoint. This simplicity helps first-time users to quickly run sample programs.

Consider the sample applications tibsend and tibrecv, and the sample realm configuration (see Sample Programs Reference).

  tibsend tibrecv
Program Description The sample program tibsend creates a publisher object, and sends one message over its one-to-many send ability. The sample program tibrecv creates a subscriber object, and receives one message over its one-to-many receive ability.
Application Name The program connects to the FTL server with a null application name. Null selects the default application definition. The program connects to the FTL server with a null application name. Null selects the default application definition.
Endpoints The sample realm defines the application default with one unnamed endpoint.

The program creates a publisher with a null endpoint name, which selects the default endpoint from the application definition.

The sample realm defines the application default with one unnamed endpoint.

The program creates a subscriber with a null endpoint name, which selects the default endpoint from the application definition.

Transport The sample realm defines the transport default as a dynamic TCP protocol. The default application definition uses this transport to carry all four abilities of its default endpoint.
Result Notice that the default transport implements the unnamed endpoints in both programs. The effect is to join the two endpoints so that messages flow from tibsend to tibrecv over a dynamic TCP bus.

After exchanging one message, both programs exit.

Program developers can also use the default definitions for a variety of applications with a similar communication structure (that is, one endpoint). To use the default definitions, programs supply null as the application name in the realm connect call, and supply null as the endpoint name in subscriber create and publisher create calls.