home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / tcpiptk / echosamp / echoclnt / readme < prev    next >
Text File  |  1999-05-11  |  3KB  |  72 lines

  1. Echosamp consists of two subdirectories, an echo client (echoclnt)
  2. and an echo server (echosrv), located in \TOOLKIT\SAMPLES\TCPIPTK\ECHOSAMP.
  3.  
  4. The echoclnt directory contains two samples of echo clients:
  5.  
  6. ECHOCLNT.C - is an echo client that uses one subroutine to handle
  7.              both UDP requests and TCP requests.
  8.  
  9. ECHOCLST.C - is an echo client that uses separate subroutines to handle
  10.              UDP requests and TCP requests.
  11.  
  12.  
  13. This program implements the client side of the Echo protocol (RFC 862).  The
  14. Echo protocol is very simple: whatever the client sends to the server, the
  15. server will send right back to the client.  The complete RFC is reproduced
  16. below:
  17.  
  18.  
  19. Network Working Group                                          J. Postel
  20. Request for Comments: 862                                            ISI
  21.                                                                 May 1983
  22.  
  23.                              Echo Protocol
  24.  
  25. This RFC specifies a standard for the ARPA Internet community.  Hosts on
  26. the ARPA Internet that choose to implement an Echo Protocol are expected
  27. to adopt and implement this standard.
  28.  
  29. A very useful debugging and measurement tool is an echo service.  An
  30. echo service simply sends back to the originating source any data it
  31. receives.
  32.  
  33. TCP Based Echo Service
  34.  
  35.    One echo service is defined as a connection based application on TCP.
  36.    A server listens for TCP connections on TCP port 7.  Once a
  37.    connection is established any data received is sent back.  This
  38.    continues until the calling user terminates the connection.
  39.  
  40. UDP Based Echo Service
  41.  
  42.    Another echo service is defined as a datagram based application on
  43.    UDP.  A server listens for UDP datagrams on UDP port 7.  When a
  44.    datagram is received, the data from it is sent back in an answering
  45.    datagram.
  46.  
  47.  
  48. Following are details on building and executing the echo server samples.
  49.  
  50.    1. To compile and link the sample programs, type:
  51.  
  52.         nmake -f vacpp.mak         (to build using the VisualAge C/C++ compiler)
  53.  
  54.     2. Executing echoclnt.exe and echoc1st.exe:
  55.  
  56.        ***note before executing the an echo client, the server must be active
  57.        on the destination host.
  58.  
  59.        a. To execute the echoclnt.exe client, type:
  60.  
  61.           echoclnt TCP hostname   (using the TCP protocol)
  62.           echoclnt UDP hostname   (using the UDP protocol)
  63.  
  64.           Then any data typed in the client OS/2 session will be echoed from the server.
  65.  
  66.        b. To execute the echoc1st.exe client, type:
  67.  
  68.           echoc1st TCP hostname   (using the TCP protocol)
  69.           echoc1st UDP hostname   (using the UDP protocol)
  70.  
  71.           Then, any data typed in the client OS/2 session will be echoed from the server.
  72.