Sample Applications
All but one of these sample applications are referenced in the text
Windows Sockets Network Programming
by Bob Quinn, and Dave Shute.
AC_FTP.EXE FTP client application (TCP)
[download]
AS_ECHO.EXE Echo server application (TCP)
[download]
UA_TIME.EXE Daytime client and server application (UDP)
[download]
MULTITST.EXE Ping (ICMP) and multicast (UDP) test application
[download]
WAL.EXE WinSock API exploration and benchmark application
[download]
WSASIMPL.DLL Sample DLL over WinSock (TCP)
[download]
WINSOCKX.LIB WinSock Reference Library
[download]
[download all samples with setup]
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.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 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.