OSF DCE Application Development Guide--Core Components
Developing a Simple RPC Application
/*
* greet_manager.c
*
* Implementation of "greet" interface.
*/
#include <stdio.h>
#include "greet.h"
void
greet(
handle_t h,
idl_char *client_greeting,
idl_char *server_reply
)
{
printf("The client says: %s\n", client_greeting);
strcpy(server_reply, "Hi, client!");
}
11.6 Building the greet Programs
The client side of the greet application is the greet_client program, which is built from
the following:
• The user-written greet_client.c client module
• The IDL-compiler-generated greet_cstub.o client stub module
• The user-written util.c module containing the error-checking routine
• DCE libraries
The server side of the greet application is the greet_server program, which is built from
the following:
• The user-written greet_server.c server module
• The user-written greet_manager.c manager module
• The user-written util.c module containing the error-checking routine
• The IDL-compiler-generated greet_sstub.o server stub module
• DCE libraries
These programs can be built by make with a makefile such as the following:
DCEROOT = /opt/dcelocal
CC = /bin/cc
IDL = idl
124245 Tandem Computers Incorporated 11− 23