--------------------------------------
 AS_ECHO.EXE: echo server application
--------------------------------------

This application is described in Chapter 6, "Socket States." in 
_Windows Sockets Network Programming_  by Bob Quinn and Dave Shute, 
published by Addison-Wesley, Reading, MA ISBN: 0-201-63372-8

What it does: AS_ECHO provides the standard TCP echo service
 (on port 7), as described by rfc862.txt">RFC 862. The application 
 reads data from any number of echo clients simultaneously, and sends 
 the data received from each client back to the client that sent it.

What it illustrates: AS_ECHO illustrates how to write a
 fast and efficient TCP server capable of handling multiple connections
 simultaneously using asynchronous operation mode.

How to Use it: As is the case with most server applications,
 AS_ECHO has a minimal user interface; it is mainly driven by clent
 connections. After you run it, it displays the local host name
 and IP address (if it could be retrieved using our GetHostID()
 routine from WINSOCKX.LIB). The main dialog box displays the number 
 of active connections, the number of connections  that have 
 disconnected, the total number of bytes received is
 updated realtime, and the data rate of the last connection is
 displayed as each client disconnects. The data rate and address
 of each connection are also logged to a file named as_echo.log.
 The application does not have any options, and the only interaction
 possible is with either the "About" button to display
 the about box, or the "Exit" button to quit the program.

Known Problems: If AS_ECHO is running on a WinSock implementation
 that uses the same buffer pool for input and output, and a client
 sends data faster than it reads data, then AS_ECHO will stop working.
 In this case it cannot send because all system buffers are full
 of incoming data, and it has no application buffer space available
 to read the data from the system buffers.

 For example, this is a problem running WAL asynch echo client
 against AS_ECHO. To avoid the problem, you can adjust the I/O
 options in the WAL client so the number of loops and loop limit
 are 1. This will lower the data throughput considerably, but you
 can increase that by decreasing the timeout to 50 milliseconds.

File List:
 AS_ECHO\AS_ECHO.DEF 
 AS_ECHO\AS_ECHO.H 
 AS_ECHO\AS_ECHO.ICO 
 AS_ECHO\RESOURCE.H 
 AS_ECHO\AS_ECHO.MAK Makefile for 16-bit as_echo.exe 
 AS_ECHO\ASECHO32.MAK Makefile for 32-bit asecho32.exe 
 AS_ECHO\AS_ECHO.RC 
 AS_ECHO\AS_ECHO.C

--------
 NOTES:
--------

We used Microsoft Visual C++ enviroments (versions 1.52 for 16-bit,
and version 2.1 for 32-bit) to create most of the makefiles.
Unfortunately, because the paths are hard-coded in the file, you will
have to bring the project files (.mak) into the respective MS C++
environments to readjust things to the new directory, and even then
you will have to manually alter the project to access the library
files (the are in the root of the directory where you install the
samples).

All samples--including the sample DLL and static library--have a
number of other things in common:

  - They all have 32-bit versions, and all 32-bit version names
     end with "32" (16-bit versions don't have a number).
  - They use the WSAperror() function from #WINSOCKX">WINSOCKX.LIB
    to display error values and short descriptions when an unexpected
    error occurs.
  - They display error messages on any suspicious error condition.
     They don't hide errors, but report them whenever they occur. As
     we describe n a_c.htm">Appendix C: WinSock Error Reference,
     these error messages should appear only when a "user fixable
     error" occurs. If you get an error message from a sample
     application for a non user-fixable error, then this may
     indicate an anomoly in the WinSock implementation that your applications
     may need to deal with. We show you the errors on purpose, to make
     you aware of unexpected conditions.
  - They have a minimal user interface, and do not have help (.HLP)
     files available.
  - They are meant to be played with. They are for exploration
     and experimentation as well as to illustrate how to write WinSock
     applications.

The icons used for each sample don't mean much, but they meet
the following three criteria:

    - They each contain the socket from the official WinSock icon.
    - Each one is colorful in its own unique and wonderful way.
    - Each took under 10 minutes to create.

