The features described in this topic are obsolete
and should not be used in new IDL code.
Using IDL as an RPC Server
The IDL RPC Directory
All of the files related to using IDL's RPC capabilities are found in the rpc subdirectory of the external subdirectory of the main IDL directory. The main IDL directory is referred to here as idldir.
Running IDL in Server Mode
To use IDL as an RPC server, run IDL in server mode by using the -server command line option. This option can be invoked one of two ways:
or
where server_number is the hexadecimal server ID number (between 0x20000000 and 0x3FFFFFFF) for IDL to use. For example, to run IDL with the server ID number 0x20500000, use the command:
If a server ID number is not supplied, IDL uses the default, IDL_DEFAULT_ID, defined in the file idldir/external/rpc/rpc_idl.h. This value is originally set to 0x2010CAFE.
The process_id argument is an optional argument that specifies the process ID of a UNIX process that should be contacted when IDL has finished running in interactive mode. If the IDL rpc server is placed in interactive mode and a process ID has been supplied on the command line, IDL sends the UNIX signal SIGUSR1 to the specified process. This signal allows the client program to know when it can continue to communicate with the rpc server.
Creating the IDL RPC Library
The machine that runs the client program must have its own version of the IDL RPC library. The make file for this library is contained in the directory idldir/external/rpc. If the machine that runs the client program is not licensed to run IDL, simply copy the contents of the IDL rpc directory to an appropriate location on the client machine.
To build the IDL RPC library, copy the IDL rpc directory to a new directory, change to that directory, and enter the make command:
The created library is contained in the file newrpcdir/rpcidl.a. The functions contained in the library are described in The IDL RPC Library
Linking your Client Program
Your client program must include the file idldir/external/rpc/rpc_idl.h.
You must also link the application that communicates with IDL with the IDL RPC library. For example, to compile and link a program with the IDL RPC library, you might enter:
where rpcclient.c is the name of your program. Note that your actual command lines and flag settings may be different than the ones shown above, depending upon your C compiler. The Makefile contains details on modifications for various systems.