PreviousNext

Running the greet Programs

Running the greet application involves starting the server program and then running the client program. Before starting the server program, you need write access to the CDS namespace and you need to ensure that the dced process is running on the server host. For more information, see the OSF DCE Command Referencedced(8dce) reference page.

You start the server program by using a CDS entry such as the following:

greet_server /.:/greet_entry

Listening...

You start the client on another host (or even the same host) by using the same CDS entry as follows:

greet_client /.:/greet_entry

The following message is printed on the server's host:

The client says: hello, server

The following reply is printed on the client's host:

The Greet Server said: Hi, client!

The server program can be terminated at any time by a signal, which on many systems can be generated by <Ctrl-c>.

When applications such as greet execute, many errors can occur that have nothing to do with your own code. In general, errors that occur when a remote procedure call executes are reported as exceptions. For example, exceptions that the client side of greet_client could raise if the server suddenly and unexpectedly halts include (but are not limited to) rpc_x_comm_failure and rpc_x_call_timeout. Other ways to respond to these errors are available through the comm_status and fault_status attributes in an interface definition or attribute configuration file. Explanations of these attributes appear in Attribute Configuration Language. Also, see Topics in RPC Application Development, which explains the guidelines for error handling.

In addition, Part 2 of this guide contains information about the macros (such as those specified by TRY, CATCH, and ENDTRY statements) for exception handling. If an exception occurs that the client application does not handle, it causes the client to terminate with an error message. The client's termination could include a core dump or other system-dependent error-reporting method. Detailed explanations of RPC status codes and RPC exceptions are in the OSF DCE Problem Determination Guide.