home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / r / rem-file.zip / remote_file / README < prev    next >
Text File  |  1992-08-20  |  6KB  |  198 lines

  1. This directory contains the complete code for the remote_file application
  2. shown in Appendix E of "Guide to Writing DCE Applications" by John Shirley,
  3. published by O'Reilly & Associates, Inc.  This application forms the basis for
  4. the discussion of context handles in Chapter 7.
  5.  
  6. A makefile is also included in this directory.  You will probably have to
  7. change the libraries listed in the makefile, because the names and contents
  8. can vary from one vendor to another, and from one release to the next.
  9.  
  10. The purpose of this application, and the RPC programming techniques that it
  11. illustrates, are covered in the book.  The rest of this README file consists
  12. of directions for building and running the application, taken from the text of
  13. the appendix.
  14.  
  15. The contents of this directory should be:
  16.  
  17. x remote_file/README, 5811 bytes, 12 tape blocks
  18. x remote_file/Makefile, 1559 bytes, 4 tape blocks
  19. x remote_file/r_client.c, 1761 bytes, 4 tape blocks
  20. x remote_file/context_rundown.c, 455 bytes, 1 tape blocks
  21. x remote_file/do_string_binding.c, 2772 bytes, 6 tape blocks
  22. x remote_file/get_args.c, 986 bytes, 2 tape blocks
  23. x remote_file/r_procedures.c, 1717 bytes, 4 tape blocks
  24. x remote_file/r_server.c, 2672 bytes, 6 tape blocks
  25. x remote_file/remote_file.idl, 767 bytes, 2 tape blocks
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                                                                         E
  39.         _________________________________________________________________
  40.  
  41.                                               The Remote_file Application
  42.  
  43.  
  44.               The remote_file client copies ASCII data from the client to
  45.               the server. The source can be a data file or the standard
  46.               input of the client. The target on the server system is
  47.               either a file or the server standard output. The remote_
  48.               file application demonstrates some advanced features of DCE
  49.               application development including:
  50.  
  51.               o  Using a context handle with a context rundown procedure
  52.  
  53.               o  Using the explicit binding method with a primitive
  54.                  binding handle
  55.  
  56.               o  Finding a server using strings of binding information
  57.  
  58.  
  59.               How to Run the Application
  60.  
  61.               To run the local test of the application, use an ASCII text
  62.               file as input and a new data file as output. The host is
  63.               not relevant for the local test. Type the following:
  64.  
  65.               C> make local
  66.               C> local_r_client.exe input  host  output
  67.  
  68.               To run the server of the distributed application, type the
  69.               following:
  70.  
  71.               S> make server
  72.               S> r_server.exe
  73.  
  74.               To run the client of the distributed application to
  75.               transfer ASCII data, use an ASCII text file as input and
  76.               a new data file on the server host as output. Type the
  77.               following:
  78.  
  79.               C> make client
  80.               C> r_client.exe input  host  output
  81.  
  82.                                           The Remote_file Application E-1
  83.  
  84.  
  85.  
  86.  
  87.  
  88.     The Remote_file Application
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.           Application Files
  96.  
  97.           Makefile contains descriptions of how the application is
  98.           compiled.
  99.  
  100.           remote_file.idl contains descriptions of the data types and
  101.           procedures for the interface.
  102.  
  103.           r_client.c interprets the user input by calling the
  104.           application-specific procedure get_args. A binding
  105.           handle representing the information about a client-
  106.           server relationship is obtained from strings of binding
  107.           information. The remote procedure remote_open is called
  108.           to open the server target file. A buffer is allocated
  109.           for a conformant array. The application loops, reading
  110.           source data and sending the data to the target with a
  111.           remote procedure call to remote_send. Finally, the remote
  112.           procedure remote_close is called to close the target file.
  113.  
  114.           get_args.c interprets the user input to obtain the name of
  115.           a local client ASCII file of source data, the server host
  116.           to use, and the server target file.
  117.  
  118.           do_string_binding.c contains the do_string_binding
  119.           procedure that shows how to find a server from strings
  120.           of binding information. A host name or network address is
  121.           input, and then combined with a generated protocol sequence
  122.           to create a valid binding handle, which is returned as a
  123.           parameter.
  124.  
  125.           context_rundown.c is the implementation of a context
  126.           rundown procedure. The server stub calls this procedure
  127.           automatically if communication breaks between a client and
  128.           the server which is maintaining context for the client. For
  129.           this application, the context is a file handle of a server
  130.           data file. This context rundown procedure closes the file.
  131.  
  132.           r_procedures.c is the implementation of the remote
  133.           procedures defined in the remote_file interface.
  134.  
  135.           r_server.c initializes the server with a series of runtime
  136.           calls prior to servicing remote procedure calls. In
  137.           this application, all available protocol sequences are
  138.           registered. The server is not advertised in a name service
  139.           database. The server's dynamic endpoints are added to the
  140.  
  141.     E-2 The Remote_file Application
  142.  
  143.  
  144.  
  145.  
  146.  
  147.                                               The Remote_file Application
  148.  
  149.  
  150.  
  151.               server's local endpoint map. A client finds this server
  152.               by constructing a string binding containing a protocol
  153.               sequence and the host name or network address.
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                           The Remote_file Application E-3
  197.  
  198.