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 5 CODE README CONTENTS
------------------------------
I. Compiling and Running the Code Examples
II. Chapter 5 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 5 Code Description

Once you have installed the .NET SDK library and executed the sdkvars command, 
you can compile the entire Chapter 5 code contents by running ch5.bat. 
Note that the executable below require source code from Chapter 4 to compile, 
and the ch5.bat file expects to find this file in the ..\ch4 directory.

The code for Chapter 5 consists of the following executable:

1.) TranscodeClientNoDeadlock* - client that sends a Unicode encoded file to the 
TranscodeServer and receives back a UTF-8 encoded version of the file. This 
version fixes the potential deadlock problem in the Chapter 4 TranscodeClient
program. As arguments takes the server and port to send to, and the filename of 
the Unicode file to send. Note this program requires a source file from Chapter 4
which ch5.bat expects to find in the ..\ch4 directory. SampleUnicode.txt is 
included in Chapter 4 zip file.

* 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. 
-----------------------------------------------------------------------------------