home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / TOOLKIT / OS2 / NPIPE / README < prev    next >
Text File  |  1995-06-08  |  3KB  |  110 lines

  1.  
  2. NPIPE - Named Pipes
  3.  
  4.  
  5. DESCRIPTION:
  6.  
  7. NPIPE demonstrates two-way communication between two unrelated processes
  8. using named pipe functions.  This sample program implements the game of
  9. tic-tac-toe with two executable files, CLINPIPE.EXE (the client) and
  10. SVRNPIPE.EXE (the server).  The server is the computer, and the client
  11. is the user.  For example, the client will:
  12.  
  13. - Connect to the server and acknowledge successful connection
  14.   (START_MSG).
  15. - Notify the server through a pipe when it wishes to begin play
  16.   (YOU_FIRST or CLIENT_MOVE).
  17. - Notify the server when it wishes to quit (CLIENT_QUIT).
  18. - Send the server a valid move when requested by the server
  19.   (CLIENT_MOVE).
  20.  
  21. In turn, the server will:
  22.  
  23. - Upon the initial request of a client to play, connect a pipe
  24.   to the client through which play will be executed (START_MSG).
  25. - Be able to play with many clients simultaneously.
  26. - Notify the client of the server's move, and request a valid move
  27.   from the client (SERVER_MOVE).
  28. - Notify the client of game-end (WIN_SERVER, WIN_CLIENT, WIN_DRAW).
  29.  
  30.  
  31. TASK:
  32. Play Tic-Tac_Toe using named pipes.
  33.  
  34. CONCEPT/FEATURE:
  35. Illustrate the use of Presentation Manager, threads and named pipes.
  36.  
  37. SAMPLE LOCATION:
  38. Inside the OS/2 Sample Programs folder (which is inside the VisualAge C++
  39. Samples folder).
  40.  
  41. Note:This sample is not provided in project form.
  42.  
  43. SOURCE FILE LOCATION:
  44.  
  45. X:\ibmcpp\samples\toolkit\os2\npipe
  46. where X: is the drive you installed the samples and document component
  47. of VisualAge C++ for OS/2.
  48.  
  49.  
  50. HOW TO RUN THE SAMPLE:
  51.  
  52. -From your OS/2 desktop:
  53.   Double-click on the sample's icon.
  54.  
  55. -From an OS/2 command prompt:
  56.   To start a non-WorkPlace Shell sample program from an OS/2 command
  57.   prompt, type the name of the executable file and press Enter.  If you
  58.   have edited source code of a sample program and want to recompile,link,
  59.   and run the files, use the NMAKE tool.  Your output is the executable
  60.   file.  For information about the NMAKE utility, see the OS/2 Tools
  61.   Reference.
  62.  
  63.  
  64. SOFTWARE/HARDWARE PREREQUISITES:
  65.  
  66. - IBM VisualAge C++
  67. - OS/2 Warp
  68. - IBM or compatible 386 and up.
  69.  
  70.  
  71. REQUIRED FILES          DESCRIPTION
  72.  
  73.   clidlg.ipf            Input to the IPF compiler for *.inf generation
  74.   clifile.ipf           Input to the IPF compiler for *.inf generation
  75.   clinpipe.def          link definitions files
  76.   clinpipe.exe          The executable
  77.   clinpipe.hlp          Help resource file
  78.   clinpipe.ipf          Input to the IPF compiler for *.inf generation
  79.   clinpipe.rc           Resource compiler input
  80.   clioptn.ipf           IPF compiler input
  81.   clnpglbl.h
  82.   clnphelp.c            Interface routines to the Help manager
  83.   clnphelp.h
  84.   clnphelp.rc           Resource compiler input
  85.   clnpmain.c            The main() file
  86.   clnpmain.h
  87.   clnpthrd.c            Threads support routines
  88.   clnpxtrn.h
  89.   help.ipf
  90.   file.ipf
  91.   dlg.ipf
  92.   namepipe.h
  93.   namepipe.ico
  94.   svrnpipe.exe
  95.   svrpgame.c
  96.   svrpmain.c
  97.   svrnpipe.hlp
  98.   svrpglbl.h
  99.   svrpmain.h
  100.   svrnpipe.ipf
  101.   svrphelp.c
  102.   svrppnt.c
  103.   svrphelp.h
  104.   svrpthrd.c
  105.   svrnpipe.def
  106.   svroptn.ipf
  107.   svrphelp.rc
  108.   svrpxtrn.h
  109.  
  110.