paradigm_3/html/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Paradigm</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.17 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>Paradigm</h1>
<p>
<h3 align="center">v0.30</h3> <div align="center">
<img src="logo.gif" alt="logo.gif">
</div>
 <h2><a name="intro">Introduction</a>
</h2> The TCP/IP network progamming examples I've seen generally ignore error detection and handling. Unfortunately this often results in poor quality servers being releasing by those who learn by example. This program features exhaustive error detection and handling. Memory leaks and buffer overruns are also ubiquitous in TCP/IP servers. This example attempts to mitigate those issues. At least that's the hope.
<p>
<h2><a name="desc">Description</a>
</h2> Paradigm in its current state is a very primitive chat server written in C++ for Win32 systems supporting Winsock2. It allows multiple connections and just echoes input to all those connected.
<p>
<h2><a name="feat">Features</a>
</h2><ul>
<li>Proper error detection.<li>Dynamic buffers.<li>Lots of comments and formatted documentation using Doxygen QT style notation.<li>No memory leaks. Tested with MemProof.<li>Multithreaded - Network server and Chat driver run in their own threads.</ul>
<h2><a name="impl">Implementation</a>
</h2> A non-blocking select-based server model was selected for this illustration for no particular reason other than usefulness of the example to other BSD derived TCP/IP stack implementations.
<p>
 There are no actual winsock2 dependencies in this version despite the negotiation present for winsock2. It should work on winsock1 systems by modifiying the WSAStartup negotiation and including the appropriate headers.
<p>
<h2><a name="changes">Changes</a>
</h2><ul>
<li>version 0.30<ul>
<li>Separation of <a class="el" href="classServer.html">Server</a> from main program. The <a class="el" href="classServer.html">Server</a> now runs in it's own thread.<li>Communication between the threads is handled by create and placing an <a class="el" href="classEvent.html">Event</a> object on shared <a class="el" href="classEventQueue.html">EventQueue</a>'s.<li><a class="el" href="classEventQueue.html">EventQueue</a> class wraps queues with thread safe guards.<li>The primitive notion of a <a class="el" href="classUser.html">User</a> class added.</ul>
</ul>
<ul>
<li>version 0.22<ul>
<li>A simple logging mechanism added via class <a class="el" href="classLog.html">Log</a>.</ul>
</ul>
<ul>
<li>version 0.20<ul>
<li>Refactored all of the low level sockets routines in <a class="el" href="classConnection.html">Connection</a> to a wrapper class <a class="el" href="classSocket.html">Socket</a>.<li><a class="el" href="classSocket.html">Socket</a> errors are implemented as exceptions.<li>Implemented a circular autoflushing buffer in the <a class="el" href="classSocket.html">Socket</a> class.<li>Communication between the server and client is handled by create and placing <a class="el" href="classEvent.html">Event</a> objects on queues.<li>Additonal comments in <a class="el" href="classServer.html">Server</a> class.<li>Added Microsoft Visual C++ project</ul>
</ul>
<ul>
<li>version 0.10<ul>
<li>Initial version</ul>
</ul>
<h2><a name="depend">System Dependencies</a>
</h2> This version only works on Windows 32-bit operating systems and was tested with Windows98, Windows NT 4.0 and Windows XP. This version was compiled and tested with the following compilers:<ul>
<li>Borland 5.3 (Borland Builder 3.0)<li>Borland 5.5.1 (Borland's free commandline compiler)<li>Microsoft Visual C++ 6.0</ul>
<h2><a name="install">Installation</a>
</h2> <h3><a name="bb3">Borland Builder 3.0 IDE</a>
</h3><ol>
<li>Unzip the distribution into the folders it wants.<li>Start Builder and open the project group (paradigm_3.bpg) in the paradigm directory.<li>Click build<li>Open a Windows command console window and switch to the paradigm directory by typing: <b>cd c:\paradigm</b> or to the path you placed it.<li>Run the server by typing: <b>paradigm</b>
<p>
</ol>
<h3><a name="bc55">Borland's Free Command Line Compiler</a>
</h3><ol>
<li>Unzip the distribution into the folders it wants.<li>Open a Windows command console window and switch to the paradigm directory by typing: <b>cd c:\paradigm</b> or to the path you placed it.<li>Then type: <b>make</b> and watch it compile.<li>Run the server by typing: <b>paradigm</b></ol>
<h3><a name="vide">VIDE with Borland's Free Command Line Compiler</a>
</h3><ol>
<li>Unzip the distribution into the folders it wants.<li>Start VIDE and open the project file (paradigm_2.vpj) in the paradigm directory.<li>Click on make<li>Open a Windows command console window and switch to the paradigm directory by typing: <b>cd c:\paradigm</b> or to the path you placed it.<li>Run the server by typing: <b>paradigm</b>
<p>
</ol>
<h3><a name="vc">Microsoft Visual C++ 6.0 (Visual Studio)</a>
</h3><ol>
<li>Unzip the distribution into the folders it wants.<li>Start Visual Studio and open the project workspace (paradigm.dsw) in the paradigm directory.<li>Click build<li>Open a Windows command console window and switch to the paradigm directory by typing: <b>cd c:\paradigm\Debug</b> or to the path you placed it. The default build is set to go to Debug folder.<li>Run the server by typing: <b>paradigm</b>
<p>
</ol>
<h2><a name="license">License</a>
</h2> Paradigm was &copy; 2003 by Jon A. Lambert - All Rights Reserved.<br>
 Paradigm has been released to the public domain by Jon A. Lambert.<br>

<p>
<h2><a name="misc">Miscellaneous</a>
</h2> <h3><a name="notes">Notes on operation</a>
</h3><ul>
<li>@shutdown will shut down the server<li>anything else echos to all connected
<p>
</ul>
<h3><a name="future">Future</a>
</h3><ul>
<li>It might be nice to support a some telnet negotiation.<li>Illustrations of other network designs, asynchronous sockets and/or IOCP edge detection.<li>A port to BSD or Linux
<p>
</ul>
<h3><a name="contact">Contact and Other Information</a>
</h3>
<p>
<dl compact><dt><b>Author: </b></dt><dd>
Jon A. Lambert<br>
 aka Tyche<br>
 Email: <a href="mailto:jlsysinc@alltel.net">jlsysinc@alltel.net</a> </dl><dl compact><dt><b>Date: </b></dt><dd>
05/02/2003 </dl><dl compact><dt><b>Version: </b></dt><dd>
0.30</dl><hr><address style="align: right;"><small>Generated on Mon Mar 29 23:12:52 2004 for Paradigm by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.17 </small></address>
</body>
</html>