/*************************************************************/
/**                                                         **/
/**                    Microsoft RPC Examples               **/
/**               OSF DCE Interop Sample Application        **/
/**                Copyright(c) Microsoft Corp. 1993        **/
/**                                                         **/
/*************************************************************/

Overview:
---------

This is a small demo RPC application.  It is designed to be portable
between OSF DCE RPC and MS RPC platforms.

The most important part of the demo is the header file dceport.h.  This
header file maps most OSF DCE RPC APIs and data structures to the
MS RPC equivalent.

The program just sends simple messages (strings) from the client
to the server.

Building on Windows/NT
----------------------

The following environment variables should be set for you already.
  set CPU=i386
  set INCLUDE=c:\mstools\h
  set LIB=c:\mstools\lib
  set PATH=c:c:\winnt\system32;\mstools\bin;

For mips, set CPU=mips

Build the sample distributed application:
  nmake cleanall
  nmake

Building on MS-DOS
------------------

After you install the Microsoft C/C++ version 7.0
development environment and the Microsoft RPC version
1.0 toolkit on an MS-DOS or Microsoft Windows computer,
you can build the sample client application for MS-DOS.
Enter:

  nmake -f makefile.dos cleanall
  nmake -f makefile.dos


Building on DCE Systems
________________________

You need to copy the following files to the DCE machine:
client.c
server.c
manager.c
msg.idl
msg.acf
makefile.dce

  make -f makefile.dce cleanall all

Note: You will probably need to change the CFLAGS and LIBS
variables in makefile.dce to match your platform.

Using the program:
------------------

The basic example:

Run
  server
on the server machine.

Run:
  client -n <server name> -s "Hi, I'm a client"
on the client machine to send the message.

Run:
  client -n <server name> -s "Okay, stop this example" -x
on the client to send the message and cause the server to stop.

You can use fixed endpoints by adding the -e switch:

server -e 3452
client -e 3452 -n <server name> -s "Hi, I'm a client"
client -e 3452 -n <server name> -s "Okay, stop this example" -x

You can run demo over a different protocol by adding a -t switch
to both the client and server:

server -t ncacn_np
client -t ncacn_np -n <server name> -s "Hi, I'm a client"
client -t ncacn_np -n <server name> -s "Okay, stop this example" -x


Options:
--------

The -h switch displays a usage message.

The -s <message> switch is used to change with message sent from the client
    to the server.  Without it the message "Hello World" is sent.

The -n <server_name> switch is used for specifying a server machine.
    Without it the server is assumed to run on the same machine.

The -e <endpoint> switch is used to specify a fixed endpoint to be used.
    Without it a dynamic endpoint will be used and registered with the
    endpoint mapper.

The -t <protseq> switch is used to specify which protocol to use.  Without
    it the protocol sequence "ncacn_ip_tcp" will be used.




















