TCP/IP Sockets in C# : Practical Guide for Programmers
by David Makofske, Michael Donahoo, and Kenneth Calvert 
Publisher: Morgan Kaufmann; (March 30, 2004) 
ISBN: 0124660517 

CHAPTER 3 CODE README CONTENTS
------------------------------
I. Compiling and Running the Code Examples
II. Chapter 3 Code Description
III. Disclaimer
-----------------------------------------------------------------------------------

I. Compiling and Running the Code Examples

Most of the book's code was designed to be compiled and run from a command prompt. 
They may also be imported into Microsoft Visual Studio for compilation. Instructions
are given here for command line usage: 

1.) Go to the Microsoft Developer Network Site (http://msdn.microsoft.com/
netframework/technologyinfo/howtoget) and download and install the .NET Framework 
SDK (at the time of this writing version 1.1).

2.) Open a windows command prompt and run the sdkvars command to set your environment 
variables.

3.) To compile a single program, use the csc command with the source file name, for 
example: 

C:\>csc IPAddressExample.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

This will create the .exe executable: 

C:\>dir

10/22/2003  03:40 PM             1,629 IPAddressExample.cs
03/12/2004  11:24 PM             4,096 IPAddressExample.exe

To run a program type the name of the program with a .exe extension or no extension 
along with any command-line arguments. 

C:\>IPAddressExample www.mkp.com

Local Host:
        tractor
        192.168.0.2
www.mkp.com:
        www.mkp.com
        129.35.78.178


To compile a single executable from several source code files, enter all the files 
on the same csc command: 

C:\>csc SendTcp.cs ItemQuote.cs ItemQuoteEncoder.cs ItemQuoteEncoderText.cs ItemQ
uoteTextConst.cs ItemQuoteDecoder.cs ItemQuoteDecoderBin.cs ItemQuoteBinConst.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

4.) Batch files are supplied (ch2.bat, ch3.bat, ch4.bat and ch5.bat) to compile all 
the code for each chapter, typing the batch file name on the command prompt will 
compile all programs in the chapter's directory: 

C:\>ch2

Note: Some of the programs in Chapters 4 and 5 utilize source files from earlier 
chapters, as described in the download section. The batch files for Chapters 4 and 
5 will automatically look for these files in the appropriate chapter directory. You 
will need to download the entire archive or all required chapter zip files for these 
programs to compile correctly. 
 
-----------------------------------------------------------------------------------

II. Chapter 3 Code Description

Once you have installed the .NET SDK library and executed the sdkvars command, 
you can compile the entire Chapter 3 code contents by running ch3.bat. The code for 
Chapter 3 consists of the following executables:

1) SendTcp* - sends the ItemQuote information over TCP. Used in conjunction with 
RecvTcp. As arguments takes a required server and port to send to.

2) RecvTcp* - receives the ItemQuote information over TCP.  Used in conjunction 
with SendTcp.  As arguments takes a required port to listen on.

3) SendUdp* - sends the ItemQuote information over UDP.  Used in conjunction with 
RecvUdp. As arguments takes a required server and port to send to.

4) RecvUdp* - receives the ItemQuote information over UDP. Used in conjunction with 
SendUdp. As arguments takes a required port to listen on.


* See book for more detailed code explainations.

-----------------------------------------------------------------------------------

III. Disclaimer

The purpose of this book is to provide general information about network 
programming as of the book's publication date. The authors have included sample 
code that is intended for the sole purpose of illustrating the use of the sockets 
API. Neither the authors nor the publisher are aware of any third party patents or 
proprietary rights that may cover any sample of any kind. The authors and the 
Publisher DISCLAIM ALL EXPRESS AND IMPLIED WARRANTIES, including warranties of 
merchantability and fitness for any particular purpose. Your use or reliance upon 
any sample code or other information in this book will be at your own risk. No one 
should use any sample code (or illustrations) from this book in any software 
application without first obtaining competent legal advice. 
-----------------------------------------------------------------------------------