summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-11-10 21:33:25 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-11-10 21:33:25 +0000
commit8957225d74555060d1a83a4c240f1e602cc82d4a (patch)
treefc8c311055b97bfa1b5d2efbbd68d8705481660d
parent922a655a3a371b2d749f59761843297c408a9d1a (diff)
downloadATCD-8957225d74555060d1a83a4c240f1e602cc82d4a.tar.gz
.
-rw-r--r--docs/ACE-tutorials.html13
-rw-r--r--docs/tutorials/Chap_2/Chap_2.zipbin0 -> 6712 bytes
-rw-r--r--docs/tutorials/Chap_2/ex01.html106
-rw-r--r--docs/tutorials/Chap_2/ex02.html95
-rw-r--r--docs/tutorials/Chap_2/ex03.html81
-rw-r--r--docs/tutorials/Chap_2/ex04.html87
-rw-r--r--docs/tutorials/Chap_2/ex05.htm87
-rw-r--r--docs/tutorials/Chap_2/ex06.html76
-rw-r--r--docs/tutorials/Chap_3/Chap_3.zipbin0 -> 3004 bytes
-rw-r--r--docs/tutorials/Chap_3/ex01.html107
-rw-r--r--docs/tutorials/Chap_3/ex02.html135
-rw-r--r--docs/tutorials/Chap_4/Chap_4.zipbin0 -> 8317 bytes
-rw-r--r--docs/tutorials/Chap_4/ex01.html74
-rw-r--r--docs/tutorials/Chap_4/ex02.html67
-rw-r--r--docs/tutorials/Chap_4/ex03.html78
-rw-r--r--docs/tutorials/Chap_4/ex04.html69
-rw-r--r--docs/tutorials/Chap_4/ex05.html69
-rw-r--r--docs/tutorials/Chap_4/ex06.html95
-rw-r--r--docs/tutorials/Chap_4/ex07.html84
-rw-r--r--docs/tutorials/Chap_4/ex08.html72
-rw-r--r--docs/tutorials/Chap_5/Chap_5.zipbin0 -> 5843 bytes
-rw-r--r--docs/tutorials/Chap_5/ex01.html75
-rw-r--r--docs/tutorials/Chap_5/ex02.html148
-rw-r--r--docs/tutorials/Chap_5/ex03.html86
-rw-r--r--docs/tutorials/Chap_5/ex04.html84
-rw-r--r--docs/tutorials/Chap_5/ex05.html87
-rw-r--r--docs/tutorials/Chap_6/Chap_6.zipbin0 -> 14305 bytes
-rw-r--r--docs/tutorials/Chap_6/ex01.html81
-rw-r--r--docs/tutorials/Chap_6/ex02.html94
-rw-r--r--docs/tutorials/Chap_6/ex03.html50
-rw-r--r--docs/tutorials/Chap_6/ex04.html44
-rw-r--r--docs/tutorials/Chap_6/ex05.html129
-rw-r--r--docs/tutorials/Chap_6/ex06.html134
-rw-r--r--docs/tutorials/Chap_6/ex07.html173
-rw-r--r--docs/tutorials/Chap_6/ex08.html96
-rw-r--r--docs/tutorials/Chap_6/ex09.html211
-rw-r--r--docs/tutorials/Chap_6/ex10.html110
-rw-r--r--docs/tutorials/Chap_7/Chap_7.zipbin0 -> 4520 bytes
-rw-r--r--docs/tutorials/Chap_7/ex01.html90
-rw-r--r--docs/tutorials/Chap_7/ex02.html165
-rw-r--r--docs/tutorials/Chap_7/ex03.html158
-rw-r--r--docs/tutorials/guide-tutorials.html48
-rw-r--r--docs/tutorials/online-tutorials.html (renamed from docs/tutorials/index.html)0
43 files changed, 3455 insertions, 3 deletions
diff --git a/docs/ACE-tutorials.html b/docs/ACE-tutorials.html
index 9c48f67409b..26177ced78d 100644
--- a/docs/ACE-tutorials.html
+++ b/docs/ACE-tutorials.html
@@ -21,14 +21,21 @@
ACE programmers guide <A HREF="http://www.cs.wustl.edu/~schmidt/PDF/ACE-tutorial.pdf.gz">[pdf]</A><A HREF="http://www.cs.wustl.edu/~schmidt/ACE-tutorial.ps.gz">[ps]</A>
<DT> <img alt="o" src="http://www.cs.wustl.edu/~schmidt/gifs/misc/redball.gif">
- <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/tutorials/">Introductory online tutorials</A>
+ <A
+ HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/tutorials/guide-tutorials.html">Online examples from the ACE programmers guide</A>
<DT> <img alt="o" src="http://www.cs.wustl.edu/~schmidt/gifs/misc/redball.gif">
- <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/tutorials/new-tutorials.html">Developing New Tutorials</A>
+ <A
+ HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/tutorials/online-tutorials.html">Introductory online ACE tutorials</A>
+
+ <DT> <img alt="o" src="http://www.cs.wustl.edu/~schmidt/gifs/misc/redball.gif">
+ <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/tutorials/new-tutorials.html">Developing new tutorials</A>
<!-- Bob's original can always be found at: http://dox.netwrench.com/acedox/fmm/ -->
<DT> <img alt="o" src="http://www.cs.wustl.edu/~schmidt/gifs/misc/redball.gif">
- <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-FMM.html">Frequently Made Mistakes (FMM)</A>
+ <A
+ HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-FMM.html">ACE
+``frequently made mistakes'' (FMM)</A>
</DL>
</TD>
diff --git a/docs/tutorials/Chap_2/Chap_2.zip b/docs/tutorials/Chap_2/Chap_2.zip
new file mode 100644
index 00000000000..e9201ef1925
--- /dev/null
+++ b/docs/tutorials/Chap_2/Chap_2.zip
Binary files differ
diff --git a/docs/tutorials/Chap_2/ex01.html b/docs/tutorials/Chap_2/ex01.html
new file mode 100644
index 00000000000..0de2788c3cf
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex01.html
@@ -0,0 +1,106 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter: "IPC SAP" (Interprocess Communication
+Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#FF0000">//Example 1</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Stream.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_DATA
+18</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_BUF
+1024</FONT>
+
+<P>class Server{
+
+<P>public:
+<BR>Server (int port):
+<BR>&nbsp;server_addr_(port),peer_acceptor_(server_addr_){
+<BR>&nbsp;data_buf_= new char[SIZE_BUF];
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Handle the connection once it has been established.</FONT>
+<BR><FONT COLOR="#FF0000">//Here the connection is handled by reading SIZE_DATA
+amount of data</FONT>
+<BR><FONT COLOR="#FF0000">//from the remote and then closing the connection</FONT>
+<BR><FONT COLOR="#FF0000">//stream down.</FONT>
+<BR>int handle_connection(){
+<BR>&nbsp;<FONT COLOR="#FF0000"> // Read data from client</FONT>
+<BR>&nbsp;if(new_stream_.recv_n (data_buf_, SIZE_DATA, 0)==-1)
+<BR>&nbsp; ACE_ERROR ((LM_ERROR, "%p\n", "Error in recv"));
+<BR>&nbsp;
+
+<P>&nbsp;ACE_DEBUG((LM_DEBUG,"Server recieved %s \n",data_buf_));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">// Close new endpoint</FONT>
+<BR>&nbsp;if (new_stream_.close () == -1)
+<BR>&nbsp; ACE_ERROR ((LM_ERROR, "%p\n", "close"));
+<BR>&nbsp;return 0;
+<BR>}
+<BR><FONT COLOR="#FF0000">//Use the acceptor component peer_acceptor_ to
+accept the connection</FONT>
+<BR><FONT COLOR="#FF0000">//into the underlying stream new_stream_. After
+the connection has been</FONT>
+<BR><FONT COLOR="#FF0000">//established call the handle_connenction() method.</FONT>
+<BR>int accept_connections (){
+<BR>&nbsp;if (peer_acceptor_.get_local_addr (server_addr_) == -1)
+<BR>&nbsp; ACE_ERROR_RETURN ((LM_ERROR,"%p\n","Error in get_local_addr"),1);
+
+<P>&nbsp;ACE_DEBUG ((LM_DEBUG,"Starting server at port %d\n",
+<BR>&nbsp; server_addr_.get_port_number ()));
+<BR>&nbsp;
+
+<P>&nbsp;<FONT COLOR="#FF0000">// Performs the iterative server activities.</FONT>
+<BR>&nbsp;while(1){
+<BR>&nbsp; ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT);
+<BR>&nbsp; if (peer_acceptor_.accept
+<BR>&nbsp;&nbsp;&nbsp; (new_stream_, &amp;client_addr_, &amp;timeout)==
+-1){
+<BR>&nbsp;&nbsp; ACE_ERROR ((LM_ERROR, "%p\n", "accept"));
+<BR>&nbsp;&nbsp; continue;
+<BR>&nbsp;&nbsp; }
+<BR>&nbsp; else
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp; "Connection established with remote %s:%d\n",
+<BR>&nbsp;&nbsp; client_addr_.get_host_name(),client_addr_.get_port_number()));
+<BR>&nbsp;&nbsp; <FONT COLOR="#FF0000">//Handle the connection</FONT>
+<BR>&nbsp;&nbsp; handle_connection();
+<BR>&nbsp; }
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P>private:
+<BR>&nbsp;char *data_buf_;
+<BR>&nbsp;ACE_INET_Addr server_addr_;
+<BR>&nbsp;ACE_INET_Addr client_addr_;
+<BR>&nbsp;ACE_SOCK_Acceptor peer_acceptor_;
+<BR>&nbsp;ACE_SOCK_Stream new_stream_;
+<BR>&nbsp;ACE_HANDLE newhandle;
+<BR>};
+
+<P>int main (int argc, char *argv[]){
+<BR>&nbsp;if(argc&lt;2){
+<BR>&nbsp; ACE_ERROR((LM_ERROR,"Usage egX &lt;port_num>"));
+<BR>&nbsp; ACE_OS::exit(1);
+<BR>&nbsp; }
+<BR>&nbsp;Server server(ACE_OS::atoi(argv[1]));
+<BR>&nbsp;server.accept_connections();
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_2/ex02.html b/docs/tutorials/Chap_2/ex02.html
new file mode 100644
index 00000000000..69891f26f1e
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex02.html
@@ -0,0 +1,95 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE&nbsp;Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">//// &nbsp;Chapter:&nbsp;"IPC&nbsp;SAP" (Interprocess
+Communication Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR:&nbsp;Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT><FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">//</FONT><FONT COLOR="#CC0000">Example 2</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Connector.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/INET_Addr.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_BUF
+128</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">NO_ITERATIONS
+5</FONT>
+
+<P>class Client{
+<BR>public:
+<BR>Client(char *hostname, int port):remote_addr_(hostname){
+<BR>&nbsp;remote_addr_.set_port_number(port);
+<BR>&nbsp;data_buf_=new char[SIZE_BUF];
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Uses a connector component connector_ to connect
+to a remote machine</FONT>
+<BR><FONT COLOR="#FF0000">//and pass the connection into a stream component
+client_stream_</FONT>
+<BR>int connect_to_server(){
+<BR>&nbsp; <FONT COLOR="#FF0000">// Initiate blocking connection with server.</FONT>
+<BR>&nbsp; ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting connect to %s:%d\n",
+<BR>&nbsp;&nbsp;&nbsp; remote_addr_.get_host_name(),remote_addr_.get_port_number()));
+<BR>&nbsp; if (connector_.connect (client_stream_, remote_addr_) == -1)
+<BR>&nbsp;&nbsp;&nbsp; ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) %p\n","connection
+failed"),-1);
+<BR>&nbsp; else
+<BR>&nbsp;&nbsp;&nbsp; ACE_DEBUG ((LM_DEBUG,"(%P|%t) connected to %s\n",
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; remote_addr_.get_host_name ()));
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">//Uses a stream component to send data to the
+remote host.</FONT>
+<BR>int send_to_server(){
+<BR>&nbsp;<FONT COLOR="#FF0000"> // Send data to server</FONT>
+<BR>&nbsp;ACE_OS::sprintf(data_buf_,"Hello from Client");
+<BR>&nbsp;for(int i=0;i&lt;NO_ITERATIONS; i++){
+<BR>&nbsp; if (client_stream_.send_n
+<BR>&nbsp;&nbsp;&nbsp; (data_buf_, ACE_OS::strlen(data_buf_), 0) == -1){
+<BR>&nbsp; ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) %p\n","send_n"),0);
+<BR>&nbsp; break;
+<BR>&nbsp; }
+<BR>&nbsp;}
+<BR>&nbsp;<FONT COLOR="#FF0000">//Close down the connection</FONT>
+<BR>&nbsp;close();
+<BR>}
+
+<P><FONT COLOR="#FF0000">//Close down the connection properly.</FONT>
+<BR>int close(){
+<BR>&nbsp;if (client_stream_.close () == -1)
+<BR>&nbsp; ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) %p\n","close"),-1);
+<BR>&nbsp;else
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P>private:
+<BR>&nbsp;ACE_SOCK_Stream client_stream_;
+<BR>&nbsp;ACE_INET_Addr remote_addr_;
+<BR>&nbsp;ACE_SOCK_Connector connector_;
+<BR>&nbsp;char *data_buf_;
+<BR>};
+
+<P>int main (int argc, char *argv[]){
+<BR>&nbsp;if(argc&lt;3){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,?Usage egX &lt;hostname> &lt;port_number>\n?));
+<BR>&nbsp; ACE_OS::exit(1);
+<BR>&nbsp; }
+<BR>&nbsp;Client client(argv[1],ACE_OS::atoi(argv[2]));
+<BR>&nbsp;client.connect_to_server();
+<BR>&nbsp;client.send_to_server();
+<BR>}
+
+<P>&nbsp;<A HREF="ex03.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_2/ex03.html b/docs/tutorials/Chap_2/ex03.html
new file mode 100644
index 00000000000..838eedcc81c
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex03.html
@@ -0,0 +1,81 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 3</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE&nbsp;Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">//// &nbsp;Chapter:&nbsp;"IPC&nbsp;SAP" (Interprocess
+Communication Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR:&nbsp;Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT><FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#CC0000">// Example 3</FONT><FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">//Server</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Dgram.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/INET_Addr.h"</FONT>
+
+<P><FONT COLOR="#000099">#define </FONT><FONT COLOR="#663366">DATA_BUFFER_SIZE
+1024</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_DATA
+18</FONT>
+
+<P>class Server{
+<BR>public:
+<BR>Server(int local_port)
+<BR>&nbsp;:local_addr_(local_port),local_(local_addr_){
+<BR>&nbsp; data_buf = new char[DATA_BUFFER_SIZE];
+<BR>&nbsp; }
+<BR><FONT COLOR="#FF0000">//Expect data to arrive from the remote machine.
+Accept it and display it.</FONT>
+<BR><FONT COLOR="#FF0000">// After recieveing data immediately send some
+data back to the remote.</FONT>
+<BR>int accept_data(){
+<BR>&nbsp;while(local_.recv(data_buf,SIZE_DATA,remote_addr_)!=-1){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG, "Data received from remote %s was %s \n"
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,remote_addr_.get_host_name(), data_buf));
+<BR>&nbsp; ACE_OS::sleep(1);
+<BR>&nbsp; if(send_data()==-1) break;
+<BR>&nbsp; }
+<BR>&nbsp;return -1;
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Method used to send data to the remote using
+the datagram component local_</FONT>
+<BR>int send_data(){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Preparing to send reply to client %s:%d\n",
+<BR>&nbsp; remote_addr_.get_host_name(),remote_addr_.get_port_number()));
+<BR>&nbsp;ACE_OS::sprintf(data_buf,"Server says hello to you too");
+<BR>&nbsp;if(
+<BR>&nbsp;local_.send(data_buf, ACE_OS::strlen(data_buf),remote_addr_)==-1)
+<BR>&nbsp; return -1;
+<BR>&nbsp;else
+<BR>&nbsp; return 0;
+<BR>&nbsp;}
+
+<P>private:
+<BR>&nbsp;char *data_buf;
+<BR>&nbsp;ACE_INET_Addr remote_addr_;
+<BR>&nbsp;ACE_INET_Addr local_addr_;
+<BR>&nbsp;ACE_SOCK_Dgram local_;
+<BR>};
+
+<P>int main(int argc, char *argv[]){
+<BR>&nbsp;Server server(ACE_OS::atoi(argv[1]));
+<BR>&nbsp;server.accept_data();
+<BR>}
+
+<P>&nbsp;<A HREF="ex04.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_2/ex04.html b/docs/tutorials/Chap_2/ex04.html
new file mode 100644
index 00000000000..41cf78188bd
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex04.html
@@ -0,0 +1,87 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 4</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter: "IPC SAP" (Interprocess Communication
+Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 4</FONT>
+<BR><FONT COLOR="#FF0000">//Client</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Dgram.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/INET_Addr.h"</FONT>
+
+<P><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">DATA_BUFFER_SIZE
+1024</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_DATA
+28</FONT>
+<BR>class Client{
+<BR>public:
+<BR>Client(char * remote_addr,int port)
+<BR>&nbsp;:remote_addr_(remote_addr),
+<BR>&nbsp; local_addr_((u_short)0),local_(local_addr_){
+<BR>&nbsp;&nbsp;&nbsp; data_buf = new char[DATA_BUFFER_SIZE];
+<BR>&nbsp; remote_addr_.set_port_number(port);
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">//Accept data from the remote host using the
+datgram component local_</FONT>
+<BR>int accept_data(){
+<BR>&nbsp;if(local_.recv(data_buf,SIZE_DATA,remote_addr_)!=-1){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG, "Data received from remote server %s
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; was: %s \n" ,remote_addr_.get_host_name(),
+data_buf));
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>&nbsp;else
+<BR>&nbsp; return -1;
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Send data to the remote. Once data has been
+sent wait for a reply from</FONT>
+<BR><FONT COLOR="#FF0000">//the server.</FONT>
+<BR>int send_data(){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Preparing to send data to server %s:%d\n",
+<BR>&nbsp;&nbsp; remote_addr_.get_host_name(),remote_addr_.get_port_number()));
+<BR>&nbsp;ACE_OS::sprintf(data_buf,"Client says hello");
+<BR>&nbsp;
+<BR>&nbsp;while(local_.send
+<BR>&nbsp;&nbsp;&nbsp; (data_buf,ACE_OS::strlen(data_buf),remote_addr_)!=-1){
+<BR>&nbsp; ACE_OS::sleep(1);
+<BR>&nbsp; if(accept_data()==-1)
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; }
+<BR>&nbsp; return -1;
+<BR>&nbsp; }
+
+<P>private:
+<BR>&nbsp;char *data_buf;
+<BR>&nbsp;ACE_INET_Addr remote_addr_;
+<BR>&nbsp;ACE_INET_Addr local_addr_;
+<BR>&nbsp;ACE_SOCK_Dgram local_;
+<BR>};
+
+<P>int main(int argc, char *argv[]){
+<BR>if(argc&lt;3){
+<BR>&nbsp;ACE_OS::printf("Usage: Client hostname port_number \n");
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR>Client client(argv[1],ACE_OS::atoi(argv[2]));
+<BR>client.send_data();
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;<A HREF="ex05.htm">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_2/ex05.htm b/docs/tutorials/Chap_2/ex05.htm
new file mode 100644
index 00000000000..1a88e7c8dbd
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex05.htm
@@ -0,0 +1,87 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 5</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter: "IPC SAP" (Interprocess Communication
+Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 5</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Dgram_Mcast.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">DEFAULT_MULTICAST_ADDR
+"224.9.9.2"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">TIMEOUT
+5</FONT>
+
+<P>class Reciever_Multicast{
+
+<P>public:
+<BR>Reciever_Multicast(int port):
+<BR>&nbsp;mcast_addr_(port,DEFAULT_MULTICAST_ADDR),remote_addr_((u_short)0){
+<BR>&nbsp;<FONT COLOR="#FF0000"> // Subscribe to multicast address.</FONT>
+<BR>&nbsp; if (mcast_dgram_.subscribe (mcast_addr_) == -1){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Error in subscribing to Multicast address
+\n"));
+<BR>&nbsp;exit(-1);
+<BR>&nbsp;}
+<BR>}
+
+<P>~Reciever_Multicast(){
+<BR>&nbsp;if(mcast_dgram_.unsubscribe()==-1)
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,?Error in unsubscribing from Mcast group\n?));
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Receive data from someone who is sending data
+on the multicast group</FONT>
+<BR><FONT COLOR="#FF0000">//address to do so it must use the multicast
+datagram component</FONT>
+<BR><FONT COLOR="#FF0000">//mcast_dgram_.</FONT>
+<BR>int recv_multicast(){
+<BR><FONT COLOR="#FF0000">&nbsp;//get ready to recieve data from the sender.</FONT>
+<BR>&nbsp;if(mcast_dgram_.recv
+<BR>&nbsp;&nbsp;&nbsp; (&amp;mcast_info,sizeof (mcast_info),remote_addr_)==-1)
+<BR>&nbsp;&nbsp;&nbsp; return -1;
+<BR>&nbsp;ACE_DEBUG ((LM_DEBUG, "(%P|%t) Received multicast from %s:%d.\n",
+<BR>&nbsp;remote_addr_.get_host_name(), remote_addr_.get_port_number()));
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Successfully receieved %d\n", mcast_info));
+<BR>&nbsp;return 0;
+<BR>&nbsp; }
+
+<P>private:
+<BR>&nbsp;ACE_INET_Addr mcast_addr_;
+<BR>&nbsp;ACE_INET_Addr remote_addr_;
+<BR>&nbsp;ACE_SOCK_Dgram_Mcast mcast_dgram_;
+<BR>&nbsp;int mcast_info;
+<BR>};
+<BR>&nbsp;
+<BR>&nbsp;
+<BR>int main(int argc, char*argv[]){
+<BR>&nbsp;Reciever_Multicast m(2000);
+<BR>&nbsp;<FONT COLOR="#FF0000">//Will run forever</FONT>
+<BR>&nbsp;while(m.recv_multicast()!=-1) {
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Multicaster succesful \n"));
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>&nbsp;ACE_DEBUG((LM_ERROR,"Multicaster failed \n"));
+<BR>&nbsp;exit(-1);
+<BR>}
+
+<P>&nbsp;<A HREF="ex06.html">Next Example</A>
+<BR>&nbsp;
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_2/ex06.html b/docs/tutorials/Chap_2/ex06.html
new file mode 100644
index 00000000000..94f40443766
--- /dev/null
+++ b/docs/tutorials/Chap_2/ex06.html
@@ -0,0 +1,76 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 6</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter: "IPC SAP" (Interprocess Communication
+Mechanisms in ACE).</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 6</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">DEFAULT_MULTICAST_ADDR
+"224.9.9.2"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">TIMEOUT
+5</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/SOCK_Dgram_Mcast.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+
+<P>class Sender_Multicast{
+<BR>public:
+<BR>Sender_Multicast(int port):
+<BR>&nbsp;local_addr_((u_short)0),dgram_(local_addr_),
+<BR>&nbsp;multicast_addr_(port,DEFAULT_MULTICAST_ADDR){}
+
+<P><FONT COLOR="#FF0000">//Method which uses a simple datagram component
+to send data to the multicast group.</FONT>
+<BR>int send_to_multicast_group(){
+<BR>&nbsp;&nbsp; <FONT COLOR="#FF0000">//Convert the information we wish
+to send into network byte order</FONT>
+<BR>&nbsp;mcast_info= htons (1000);
+
+<P><FONT COLOR="#FF0000">&nbsp;// Send multicast</FONT>
+<BR>&nbsp;if(dgram_.send
+<BR>&nbsp;&nbsp;&nbsp; (&amp;mcast_info, sizeof (mcast_info), multicast_addr_)==-1)
+<BR>&nbsp;&nbsp;&nbsp; return -1;
+
+<P>&nbsp;ACE_DEBUG ((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+"%s; Sent multicast to group.&nbsp; Number sent is %d.\n",
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+__FILE__,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+mcast_info));
+<BR>&nbsp; return 0;
+<BR>}
+
+<P>private:
+<BR>&nbsp;ACE_INET_Addr multicast_addr_;
+<BR>&nbsp;ACE_INET_Addr local_addr_;
+<BR>&nbsp;ACE_SOCK_Dgram dgram_;
+<BR>&nbsp;int mcast_info;
+<BR>};
+<BR>&nbsp;
+
+<P>int main(int argc, char*argv[]){
+<BR>Sender_Multicast m(2000);
+<BR>if(m.send_to_multicast_group()==-1) {
+<BR>&nbsp;ACE_DEBUG((LM_ERROR,"Send to Multicast group failed \n"));
+<BR>&nbsp;exit(-1);
+<BR>&nbsp;}
+<BR>else
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Send to Multicast group succesful \n"));
+<BR>}
+
+<P>&nbsp;<A HREF="../Chap_3/ex01.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_3/Chap_3.zip b/docs/tutorials/Chap_3/Chap_3.zip
new file mode 100644
index 00000000000..c99463d18d9
--- /dev/null
+++ b/docs/tutorials/Chap_3/Chap_3.zip
Binary files differ
diff --git a/docs/tutorials/Chap_3/ex01.html b/docs/tutorials/Chap_3/ex01.html
new file mode 100644
index 00000000000..a722e9a9b6d
--- /dev/null
+++ b/docs/tutorials/Chap_3/ex01.html
@@ -0,0 +1,107 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 1</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Memory Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 1&nbsp;</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Malloc.h"</FONT>
+<BR><FONT COLOR="#FF0000">//A chunk of size 1K is created</FONT>
+<BR><FONT COLOR="#000099">typedef</FONT> <FONT COLOR="#993300">char</FONT><FONT COLOR="#666600">
+MEMORY_BLOCK[1024];</FONT>
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Create an ACE_Cached_Allocator which is passed
+in the type of the</FONT>
+<BR><FONT COLOR="#FF0000">//chunk&nbsp; that it must pre-allocate and assign
+on the free</FONT>
+<BR><FONT COLOR="#FF0000">//list</FONT>
+<BR><FONT COLOR="#000000">typedef ACE_Cached_Allocator&lt;MEMORY_BLOCK,ACE_SYNCH_MUTEX>
+Allocator;</FONT>
+<BR>&nbsp;
+<BR>class MessageManager{
+<BR>public:
+<BR><FONT COLOR="#FF0000">//The constructor is passed the number of chunks
+that the allocator should pre-allocate //and maintain on its free list.</FONT>
+<BR>MessageManager(int n_blocks):
+<BR>&nbsp;allocator_(n_blocks),message_count_(0){}
+
+<P><FONT COLOR="#FF0000">//Allocate memory for a message using the Allocator</FONT>
+<BR>void allocate_msg(const char *msg){
+<BR>&nbsp;mesg_array_[message_count_]=
+<BR>&nbsp;&nbsp;&nbsp; (char*)allocator_.malloc(ACE_OS::strlen(msg));
+<BR>&nbsp;ACE_OS::strcpy(mesg_array_[message_count_],msg);
+<BR>&nbsp;message_count_++;
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Free all memory allocated. This will cause the
+chunks to be returned</FONT>
+<BR><FONT COLOR="#FF0000">//to the allocators internal free list and NOT
+to the OS.</FONT>
+<BR>void free_all_msg(){
+<BR>&nbsp;for(int i=0;i&lt;message_count_;i++)
+<BR>&nbsp; allocator_.free(mesg_array_[i]);
+<BR>&nbsp;message_count_=0;
+<BR>&nbsp;}
+<BR>void display_all_msg(){
+<BR>&nbsp;for(int i=0;i&lt;message_count_;i++)
+<BR>&nbsp; ACE_OS::printf("%s\n",mesg_array_[i]);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>private:
+<BR>&nbsp;char *mesg_array_[20];
+<BR>&nbsp;Allocator allocator_;
+<BR>&nbsp;int message_count_;
+<BR>};
+<BR>&nbsp;
+
+<P>int main(int argc, char* argv[]){
+
+<P>if(argc&lt;2){
+<BR>&nbsp;ACE_OS::printf("Usage: egXX &lt;Number of blocks>\n");
+<BR>&nbsp;exit(1);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">//Instatiate the Memory Manager class</FONT>
+<BR>int n_blocks=ACE_OS::atoi(argv[1]);
+<BR>MessageManager mm(n_blocks);
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Use the Memory Manager class to assign messages
+and free them.</FONT> <FONT COLOR="#FF0000">Run this in your</FONT>
+<BR><FONT COLOR="#FF0000">//debug environment and you will notice that
+//the</FONT> <FONT COLOR="#FF0000">amount of memory your program uses</FONT>
+<BR><FONT COLOR="#FF0000">//after Memory Manager has been</FONT> <FONT COLOR="#FF0000">instantiated
+remains the same. That means the</FONT>
+<BR><FONT COLOR="#FF0000">//Cached Allocator</FONT> <FONT COLOR="#FF0000">controls
+or manages all the memory for the application.</FONT>
+
+<P><FONT COLOR="#FF0000">//Do forever.</FONT>
+<BR>while(1){
+<BR>&nbsp; <FONT COLOR="#FF0000">//allocate the messages somewhere</FONT>
+<BR>&nbsp;for(int i=0; i&lt;n_blocks;i++)
+<BR>&nbsp; mm.allocate_msg("Hi there");
+<BR>&nbsp;<FONT COLOR="#FF0000">//show the messages</FONT>
+<BR>&nbsp;mm.display_all_msg();
+<BR>&nbsp;
+<BR>&nbsp;for( i=0;i&lt;n_blocks;i++)
+<BR>&nbsp; mm.free_all_msg();
+<BR>&nbsp;}
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_3/ex02.html b/docs/tutorials/Chap_3/ex02.html
new file mode 100644
index 00000000000..b425bfb9565
--- /dev/null
+++ b/docs/tutorials/Chap_3/ex02.html
@@ -0,0 +1,135 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Memory Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 2</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Shared_Memory_MM.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Malloc.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Malloc_T.h"</FONT>
+<BR><FONT COLOR="#000099">#define </FONT><FONT COLOR="#663366">DATA_SIZE
+100</FONT>
+<BR><FONT COLOR="#000099">#define</FONT><FONT COLOR="#663366"> MESSAGE1
+"Hiya over there client process"</FONT>
+<BR><FONT COLOR="#000099">#define </FONT><FONT COLOR="#663366">MESSAGE2&nbsp;
+"Did you hear me the first time?"</FONT>
+<BR>LPCTSTR poolname="My_Pool";
+
+<P><FONT COLOR="#000000">typedef ACE_Malloc&lt;ACE_SHARED_MEMORY_POOL,ACE_Null_Mutex>
+Malloc_Allocator;</FONT>
+
+<P>static void
+<BR>server (void){
+<BR>&nbsp;<FONT COLOR="#FF0000">//Create the memory allocator passing it
+the shared memory</FONT>
+<BR>&nbsp;<FONT COLOR="#FF0000">//pool that you want to use</FONT>
+<BR>&nbsp;Malloc_Allocator shm_allocator(poolname);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Create a message, allocate memory for
+it and bind it with</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//a name so that the client can the find
+it in the memory</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//pool</FONT>
+<BR>&nbsp;char* Message1=(char*)shm_allocator.malloc(strlen(MESSAGE1));
+<BR>&nbsp;ACE_OS::strcpy(Message1,MESSAGE1);
+<BR>&nbsp;shm_allocator.bind("FirstMessage",Message1);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"&lt;&lt;%s\n",Message1));
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//How about a second message</FONT>
+<BR>&nbsp;char* Message2=(char*)shm_allocator.malloc(strlen(MESSAGE2));
+<BR>&nbsp;ACE_OS::strcpy(Message2,MESSAGE2);
+<BR>&nbsp;shm_allocator.bind("SecondMessage",Message2);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"&lt;&lt;%s\n",Message2));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Set the Server to go to sleep for a while
+so that the client has</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//a chance to do its stuff</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "Server done writing.. going to sleep zzz..\n\n\n"));
+<BR>&nbsp;ACE_OS::sleep(2);
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Get rid of all resources allocated by
+the server. In other</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//words get rid of the shared memory pool
+that had been</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//previously allocated</FONT>
+<BR>&nbsp;shm_allocator.remove();
+<BR>&nbsp;
+<BR>}
+<BR>&nbsp;
+
+<P>static void
+<BR>client(void){
+<BR>&nbsp;<FONT COLOR="#FF0000">//Create a memory allocator. Be sure that
+the client passes</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// in the "right" name here so that both
+the client and the</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//server use the same memory pool. We wouldnt
+want them to</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// BOTH create different underlying pools.</FONT>
+<BR>&nbsp;Malloc_Allocator shm_allocator(poolname);
+
+<P><FONT COLOR="#FF0000">&nbsp;//Lets get that first message. Notice that
+the find is looking up the</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//memory based on the "name" that was bound
+to it by the server.</FONT>
+<BR>&nbsp;void *Message1;
+<BR>&nbsp;if(shm_allocator.find("FirstMessage",Message1)==-1){
+<BR>&nbsp; ACE_ERROR((LM_ERROR,
+<BR>&nbsp;&nbsp;&nbsp; "Client: Problem cant find data that server has
+sent\n"));
+<BR>&nbsp; ACE_OS::exit(1);
+<BR>&nbsp; }
+<BR>&nbsp;ACE_OS::printf(">>%s\n",(char*) Message1);
+<BR>&nbsp;ACE_OS::fflush(stdout);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Lets get that second message now.</FONT>
+<BR>&nbsp;void *Message2;
+<BR>&nbsp;if(shm_allocator.find("SecondMessage",Message2)==-1){
+<BR>&nbsp; ACE_ERROR((LM_ERROR,"Client: Problem cant find data that server
+has sent\n"));
+<BR>&nbsp; ACE_OS::exit(1);
+<BR>&nbsp; }
+<BR>&nbsp;ACE_OS::printf(">>%s\n",(char*)Message2);
+<BR>&nbsp;ACE_OS::fflush(stdout);
+
+<P>&nbsp;ACE_DEBUG((LM_DEBUG,"Client done reading! BYE NOW\n"));
+<BR>&nbsp;ACE_OS::fflush(stdout);
+<BR>}
+<BR>&nbsp;
+
+<P>int main (int, char *[]){
+<BR>switch (ACE_OS::fork ())
+<BR>&nbsp;&nbsp;&nbsp; {
+<BR>&nbsp;&nbsp;&nbsp; case -1:
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_ERROR_RETURN ((LM_ERROR, "%p\n",
+"fork"), 1);
+<BR>&nbsp;&nbsp;&nbsp; case 0:
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"> // Make sure the
+server starts up first.</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::sleep (1);
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client ();
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;
+<BR>&nbsp;&nbsp;&nbsp; default:
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server ();
+<BR>&nbsp;&nbsp;&nbsp; break;
+<BR>&nbsp;}
+<BR>&nbsp; return 0;
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;<A HREF="../Chap_4/ex01.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/Chap_4.zip b/docs/tutorials/Chap_4/Chap_4.zip
new file mode 100644
index 00000000000..b29059f1457
--- /dev/null
+++ b/docs/tutorials/Chap_4/Chap_4.zip
Binary files differ
diff --git a/docs/tutorials/Chap_4/ex01.html b/docs/tutorials/Chap_4/ex01.html
new file mode 100644
index 00000000000..00e8cb8f51d
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex01.html
@@ -0,0 +1,74 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 1</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 1</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Synch.h"</FONT>
+<BR>static int number=0;
+<BR>static int seed=0;
+
+<P>static void*
+<BR>worker(void *arg){
+<BR>&nbsp;ACE_UNUSED_ARG(arg);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread (%t) Created to do some work"));
+<BR>&nbsp;::number++;
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG," and number is %d\n",::number));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Let the other guy go while I fall asleep
+for a random period of time</FONT>
+<BR>&nbsp;ACE_Thread::yield();
+<BR>&nbsp;ACE_OS::sleep(ACE_OS::rand()%2);
+
+<P><FONT COLOR="#FF0000">&nbsp;//Exiting now</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp; "\t\t Thread (%t) Done! \t The number is now: %d\n",number));
+<BR>&nbsp;ACE_OS::fflush(stdout);
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+<BR>&nbsp;
+
+<P>int main(int argc, char *argv[]){
+<BR>if(argc&lt;2)
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Usage: &lt;program_name> &lt;number of threads>\n"));
+<BR>&nbsp;
+<BR>int n_threads=ACE_OS::atoi(argv[1]);
+<BR><FONT COLOR="#FF0000">//Setup the random number generator</FONT>
+<BR>ACE_OS::srand(::seed);
+
+<P><FONT COLOR="#FF0000">//Spawn off n_threads number of threads</FONT>
+<BR>for(int i=0; i&lt;n_threads; i++){
+<BR>&nbsp;if(ACE_Thread::spawn((ACE_THR_FUNC)worker)==-1)
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Error in spawning thread\n"));
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Wait for all the threads to exit before you
+let the main fall through</FONT>
+<BR><FONT COLOR="#FF0000">//and have the process exit. This way of using
+join is non-portable</FONT>
+<BR><FONT COLOR="#FF0000">//and may not work on a system using pthreads.</FONT>
+<BR>int check_count=0;
+<BR>while(ACE_Thread::join(NULL,NULL,NULL)==0) check_count++;
+<BR>ACE_ASSERT(check_count==n_threads);
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+<BR>&nbsp;
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex02.html b/docs/tutorials/Chap_4/ex02.html
new file mode 100644
index 00000000000..4feefe6dbe5
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex02.html
@@ -0,0 +1,67 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 2</FONT>
+<BR><FONT COLOR="#000099">#include </FONT><FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Arguments that are to be passed to the worker
+thread are passed through this class.</FONT>
+<BR>class Args{
+<BR>public:
+<BR>Args(int iterations):
+<BR>&nbsp;mutex_(),iterations_(iterations){}
+<BR>ACE_Thread_Mutex mutex_;
+<BR>int iterations_;
+<BR>};
+
+<P><FONT COLOR="#FF0000">//The starting point for the worker threads</FONT>
+<BR>static void*
+<BR>worker(void*arguments){
+<BR>Args *arg= (Args*) arguments;
+<BR>for(int i=0;i&lt;arg->iterations_;i++){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "(%t) Trying to get a hold of this iteration\n"));
+<BR><FONT COLOR="#FF0000">&nbsp;//This is our critical section</FONT>
+<BR>&nbsp;arg->mutex_.acquire();
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) This is iteration number %d\n",i));
+<BR><FONT COLOR="#FF0000">&nbsp;//work</FONT>
+<BR>&nbsp;ACE_OS::sleep(2);
+<BR>&nbsp;arg->mutex_.release();
+<BR>&nbsp;}
+<BR>return 0;
+<BR>}
+
+<P>int main(int argc, char*argv[]){
+<BR>if(argc&lt;2){
+<BR>ACE_OS::printf("Usage: egx &lt;number_of_threads>
+<BR>&nbsp;&nbsp;&nbsp; &lt;number_of_iterations>\n");
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR><FONT COLOR="#FF0000">//Setup the arguments</FONT>
+<BR>Args arg(ACE_OS::atoi(argv[2]));
+
+<P>ACE_Thread::spawn_n
+<BR>&nbsp;&nbsp; (ACE_OS::atoi(argv[1]),(ACE_THR_FUNC)worker,(void*)&amp;arg);
+<BR><FONT COLOR="#FF0000">//Spawn the worker threads</FONT>
+<BR>while(ACE_Thread::join(NULL,NULL,NULL)==0);
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp; <A HREF="ex03.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex03.html b/docs/tutorials/Chap_4/ex03.html
new file mode 100644
index 00000000000..56fbd9441aa
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex03.html
@@ -0,0 +1,78 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 3</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 3</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Arguments that are to be passed to the worker
+thread are passed through this class.</FONT>
+<BR>class Args{
+<BR>public:
+<BR>Args(ACE_Lock* lock,int iterations):
+<BR>&nbsp;mutex_(lock),iterations_(iterations){}
+<BR>ACE_Lock* mutex_;
+<BR>int iterations_;
+<BR>};
+
+<P><FONT COLOR="#FF0000">//The starting point for the worker threads</FONT>
+<BR>static void*
+<BR>worker(void*arguments){
+<BR>Args *arg= (Args*) arguments;
+<BR>for(int i=0;i&lt;arg->iterations_;i++){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "(%t) Trying to get a hold of this iteration\n"));
+<BR><FONT COLOR="#FF0000">&nbsp;//This is our critical section</FONT>
+<BR>&nbsp;arg->mutex_->acquire();
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) This is iteration number %d\n",i));
+<BR><FONT COLOR="#FF0000">&nbsp;//work</FONT>
+<BR>&nbsp;ACE_OS::sleep(2);
+<BR>&nbsp;arg->mutex_->release();
+<BR>&nbsp;}
+<BR>return 0;
+<BR>}
+
+<P>int main(int argc, char*argv[]){
+<BR>if(argc&lt;4){
+<BR>&nbsp;ACE_OS::printf("Usage: egx &lt;number_of_threads>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;number_of_iterations> &lt;lock_type>\n");
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR><FONT COLOR="#FF0000">//Lock used by application</FONT>
+<BR>ACE_Lock *lock;
+
+<P><FONT COLOR="#FF0000">//Decide which lock you want to use at run time.
+Possible due to</FONT>
+<BR><FONT COLOR="#FF0000">//ACE_Lock.</FONT>
+<BR>if(ACE_OS::strcmp(argv[3],"Thread"))
+<BR>&nbsp;lock=new ACE_Lock_Adapter&lt;ACE_Thread_Mutex>;
+<BR>else
+<BR>&nbsp;lock=new ACE_Lock_Adapter&lt;ACE_Mutex>
+
+<P><FONT COLOR="#FF0000">//Setup the arguments</FONT>
+<BR>Args arg(lock,ACE_OS::atoi(argv[2]));
+<BR><FONT COLOR="#FF0000">//Spawn the worker threads</FONT>
+<BR>ACE_Thread::spawn_n
+<BR>&nbsp;&nbsp;&nbsp; (ACE_OS::atoi(argv[1]),(ACE_THR_FUNC)worker,(void*)&amp;arg);
+<BR>while(ACE_Thread::join(NULL,NULL,NULL)==0);
+<BR>}
+
+<P>&nbsp;<A HREF="ex04.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex04.html b/docs/tutorials/Chap_4/ex04.html
new file mode 100644
index 00000000000..091433ba5be
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex04.html
@@ -0,0 +1,69 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 4</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 4</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Token.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Arguments that are to be passed to the worker
+thread are passed</FONT>
+<BR><FONT COLOR="#FF0000">//through this class.</FONT>
+<BR>class Args{
+<BR>public:
+<BR>Args(int iterations):
+<BR>&nbsp;mutex_(),iterations_(iterations){}
+<BR>ACE_Token mutex_;
+<BR>int iterations_;
+<BR>};
+
+<P><FONT COLOR="#FF0000">//The starting point for the worker threads</FONT>
+<BR>static void*
+<BR>worker(void*arguments){
+<BR>Args *arg= (Args*) arguments;
+<BR>for(int i=0;i&lt;arg->iterations_;i++){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) Trying to get a hold of this iteration\n"));
+<BR><FONT COLOR="#FF0000">&nbsp;//This is our critical section</FONT>
+<BR>&nbsp;arg->mutex_.acquire();
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) This is iteration number %d\n",i));
+<BR><FONT COLOR="#FF0000">&nbsp;//work</FONT>
+<BR>&nbsp;ACE_OS::sleep(2);
+<BR>&nbsp;arg->mutex_.release();
+<BR>&nbsp;}
+<BR>return 0;
+<BR>}
+<BR>&nbsp;
+
+<P>int main(int argc, char*argv[]){
+<BR>if(argc&lt;4){
+<BR>&nbsp;ACE_OS::printf("Usage: egx &lt;number_of_threads>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;number_of_iterations> &lt;lock_type>\n");
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Setup the arguments</FONT>
+<BR>Args arg(ACE_OS::atoi(argv[2]));
+<BR><FONT COLOR="#FF0000">//Spawn the worker threads</FONT>
+<BR>ACE_Thread::spawn_n(ACE_OS::atoi(argv[1]),(ACE_THR_FUNC)worker,(void*)&amp;arg);
+
+<P>while(ACE_Thread::join(NULL,NULL,NULL)==0);
+
+<P>}
+
+<P>&nbsp;<A HREF="ex05.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex05.html b/docs/tutorials/Chap_4/ex05.html
new file mode 100644
index 00000000000..74fbb7cd80f
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex05.html
@@ -0,0 +1,69 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 5</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 5</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Token.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Arguments that are to be passed to the worker
+thread are passed through this class.</FONT>
+<BR>class Args{
+<BR>public:
+<BR>Args(int iterations):
+<BR>&nbsp;mutex_(),iterations_(iterations){}
+<BR>ACE_Token mutex_;
+<BR>int iterations_;
+<BR>};
+
+<P><FONT COLOR="#FF0000">//The starting point for the worker threads</FONT>
+<BR>static void*
+<BR>worker(void*arguments){
+<BR>Args *arg= (Args*) arguments;
+<BR>for(int i=0;i&lt;arg->iterations_;i++){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) Trying to get a hold of this iteration\n"));
+<BR>&nbsp; {<FONT COLOR="#FF0000">//begin critical section</FONT>
+<BR>&nbsp; ACE_Guard&lt;ACE_Token> guard(arg->mutex_);
+<BR>&nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"> //This is our critical section</FONT>
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"(%t) This is iteration number %d\n",i));
+<BR><FONT COLOR="#FF0000">&nbsp; //work</FONT>
+<BR>&nbsp; ACE_OS::sleep(2);
+<BR>&nbsp; }<FONT COLOR="#FF0000">//end critical section</FONT>
+<BR>&nbsp;}
+<BR>return 0;
+<BR>}
+<BR>&nbsp;
+
+<P>int main(int argc, char*argv[]){
+<BR>if(argc&lt;3){
+<BR>&nbsp;ACE_OS::printf("Usage: egx &lt;number_of_threads> &lt;number_of_iterations>
+\n");
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Setup the arguments</FONT>
+<BR>Args arg(ACE_OS::atoi(argv[2]));
+<BR><FONT COLOR="#FF0000">//Spawn the worker threads</FONT>
+<BR>ACE_Thread::spawn_n(ACE_OS::atoi(argv[1]),(ACE_THR_FUNC)worker,(void*)&amp;arg);
+<BR>while(ACE_Thread::join(NULL,NULL,NULL)==0);
+<BR>}
+
+<P>&nbsp;<A HREF="ex06.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex06.html b/docs/tutorials/Chap_4/ex06.html
new file mode 100644
index 00000000000..7a8df16dcd3
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex06.html
@@ -0,0 +1,95 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 6</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 6</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include </FONT><FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Synch.h"</FONT>
+
+<P>static int number=0;
+<BR>static int seed=0;
+
+<P>class Args{
+<BR>public:
+<BR>Args(ACE_Condition&lt;ACE_Thread_Mutex> *cond, int threads):
+<BR>&nbsp;cond_(cond), threads_(threads){}
+<BR>ACE_Condition&lt;ACE_Thread_Mutex> *cond_;
+<BR>int threads_;
+<BR>};
+
+<P>static void*
+<BR>worker(void *arguments){
+<BR>&nbsp;Args *arg= (Args*)arguments;
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread (%t) Created to do some work\n"));
+<BR>&nbsp;::number++;
+<BR><FONT COLOR="#FF0000">&nbsp;//Work</FONT>
+<BR>&nbsp;ACE_OS::sleep(ACE_OS::rand()%2);
+
+<P><FONT COLOR="#FF0000">&nbsp;//Exiting now</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "\tThread (%t) Done! \n\tThe number is now: %d\n",number));
+<BR><FONT COLOR="#FF0000">&nbsp;//If all threads are done signal main thread
+that program can now exit</FONT>
+<BR>&nbsp;if(number==arg->threads_){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; "(%t) Last Thread!\n All threads have done
+their job!
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; Signal main thread\n"));
+<BR>&nbsp; arg->cond_->signal();
+<BR>&nbsp; }
+<BR>return 0;
+<BR>}
+<BR>&nbsp;
+
+<P>int main(int argc, char *argv[]){
+<BR>if(argc&lt;2){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Usage: &lt;program_name> &lt;number of threads>\n"));
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>int n_threads=ACE_OS::atoi(argv[1]);
+
+<P><FONT COLOR="#FF0000">//Setup the random number generator</FONT>
+<BR>ACE_OS::srand(::seed);
+
+<P><FONT COLOR="#FF0000">//Setup arguments for threads</FONT>
+<BR>ACE_Thread_Mutex mutex;
+<BR>ACE_Condition&lt;ACE_Thread_Mutex> cond(mutex);
+<BR>Args arg(&amp;cond,n_threads);
+
+<P><FONT COLOR="#FF0000">//Spawn off n_threads number of threads</FONT>
+<BR>for(int i=0; i&lt;n_threads; i++){
+<BR>&nbsp;if(ACE_Thread::spawn((ACE_THR_FUNC)worker,(void*)&amp;arg,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THR_DETACHED|THR_NEW_LWP)==-1)
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Error in spawning thread\n"));
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Wait for signal indicating that all threads
+are done and program can exit</FONT>
+<BR>mutex.acquire();
+<BR>if(number!=n_threads)
+<BR>&nbsp;cond.wait();
+<BR>ACE_DEBUG((LM_DEBUG,"(%t) Main Thread got signal. Program exiting..\n"));
+<BR>mutex.release();
+<BR>ACE_OS::exit(0);
+<BR>}
+
+<P>&nbsp;<A HREF="ex07.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex07.html b/docs/tutorials/Chap_4/ex07.html
new file mode 100644
index 00000000000..4adf56569d3
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex07.html
@@ -0,0 +1,84 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 7</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 7</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/OS.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+
+<P>static int number=0;
+<BR>static int seed=0;
+
+<P>class Args{
+<BR>public:
+<BR>Args(ACE_Barrier *barrier):
+<BR>&nbsp;barrier_(barrier){}
+<BR>ACE_Barrier *barrier_;
+<BR>};
+
+<P>static void*
+<BR>worker(void *arguments){
+<BR>&nbsp;Args *arg= (Args*)arguments;
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread (%t) Created to do some work\n"));
+<BR>&nbsp;::number++;
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Work</FONT>
+<BR>&nbsp;ACE_OS::sleep(ACE_OS::rand()%2);
+
+<P><FONT COLOR="#FF0000">&nbsp;//Exiting now</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "\tThread (%t) Done! \n\tThe number is now: %d\n",number));
+<BR><FONT COLOR="#FF0000">&nbsp;//Let the barrier know we are done.</FONT>
+<BR>&nbsp;arg->barrier_->wait();
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread (%t) is exiting \n"));
+<BR>&nbsp;return 0;
+<BR>}
+<BR>&nbsp;
+
+<P>int main(int argc, char *argv[]){
+<BR>if(argc&lt;2){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Usage: &lt;program_name> &lt;number of threads>\n"));
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>int n_threads=ACE_OS::atoi(argv[1]);
+<BR>ACE_DEBUG((LM_DEBUG,"Preparing to spawn %d threads",n_threads));
+<BR><FONT COLOR="#FF0000">//Setup the random number generator</FONT>
+<BR>ACE_OS::srand(::seed);
+
+<P><FONT COLOR="#FF0000">//Setup arguments for threads</FONT>
+<BR>ACE_Barrier barrier(n_threads);
+<BR>Args arg(&amp;barrier);
+
+<P><FONT COLOR="#FF0000">//Spawn off n_threads number of threads</FONT>
+<BR>for(int i=0; i&lt;n_threads; i++){ if(ACE_Thread::spawn((ACE_THR_FUNC)worker,(void*)&amp;arg,THR_DETACHED|THR_NEW_LWP)==-1)
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Error in spawning thread\n"));
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Wait for all the other threads to let the main
+thread</FONT>
+<BR><FONT COLOR="#FF0000">// know that they are done using hte barrier</FONT>
+<BR>barrier.wait();
+<BR>ACE_DEBUG((LM_DEBUG,"(%t)Other threads are finished. Program exiting..\n"));
+<BR>ACE_OS::sleep(2);
+<BR>}
+
+<P>&nbsp;<A HREF="ex08.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_4/ex08.html b/docs/tutorials/Chap_4/ex08.html
new file mode 100644
index 00000000000..2418a93c0a8
--- /dev/null
+++ b/docs/tutorials/Chap_4/ex08.html
@@ -0,0 +1,72 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 8</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "Thread Management"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 8</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+
+<P>ACE_Atomic_Op&lt;ACE_Thread_Mutex,int> foo;
+
+<P>static void*
+<BR>worker(void *arg){
+<BR>&nbsp; ACE_UNUSED_ARG(arg);
+<BR>&nbsp; foo=5;
+<BR>&nbsp; ACE_ASSERT (foo == 5);
+<BR>&nbsp;
+<BR>&nbsp; ++foo;
+<BR>&nbsp; ACE_ASSERT (foo == 6);
+<BR>&nbsp;
+<BR>&nbsp; --foo;
+<BR>&nbsp; ACE_ASSERT (foo == 5);
+<BR>&nbsp;
+<BR>&nbsp; foo += 10;
+<BR>&nbsp; ACE_ASSERT (foo == 15);
+<BR>&nbsp;
+<BR>&nbsp; foo -= 10;
+<BR>&nbsp; ACE_ASSERT (foo == 5);
+<BR>&nbsp;
+<BR>&nbsp; foo = 5L;
+<BR>&nbsp; ACE_ASSERT (foo == 5);
+<BR>&nbsp;return 0;
+<BR>}
+
+<P>int main(int argc, char *argv[]){
+<BR>if(argc&lt;2){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Usage: &lt;program_name> &lt;number of threads>\n"));
+<BR>&nbsp;ACE_OS::exit(1);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>int n_threads=ACE_OS::atoi(argv[1]);
+<BR>ACE_DEBUG((LM_DEBUG,"Preparing to spawn %d threads\n",n_threads));
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Spawn off n_threads number of threads</FONT>
+<BR>for(int i=0; i&lt;n_threads; i++){
+<BR>&nbsp;if(ACE_Thread::spawn((ACE_THR_FUNC)worker,0,THR_DETACHED|THR_NEW_LWP)==-1)
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Error in spawning thread\n"));
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Wait for all the other threads to let the main
+thread know when it is time to exit</FONT>
+<BR>while(ACE_Thread::join(NULL,NULL,NULL)==0);
+<BR>ACE_DEBUG((LM_DEBUG,"(%t)Other threads are finished. Program exiting..\n"));
+<BR>}
+
+<P>&nbsp;<A HREF="../Chap_5/ex01.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_5/Chap_5.zip b/docs/tutorials/Chap_5/Chap_5.zip
new file mode 100644
index 00000000000..5eb2b6646d0
--- /dev/null
+++ b/docs/tutorials/Chap_5/Chap_5.zip
Binary files differ
diff --git a/docs/tutorials/Chap_5/ex01.html b/docs/tutorials/Chap_5/ex01.html
new file mode 100644
index 00000000000..54bb3204b61
--- /dev/null
+++ b/docs/tutorials/Chap_5/ex01.html
@@ -0,0 +1,75 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 1</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Reactor" (Event
+Management)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#FF0000">//Example 1</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">&lt;signal.h></FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Event_Handler.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Create our subclass to handle the signal events</FONT>
+<BR><FONT COLOR="#FF0000">//that we wish to handle. Since we know that
+this particular</FONT>
+<BR><FONT COLOR="#FF0000">//event handler is going to be using signals
+we only overload the</FONT>
+<BR><FONT COLOR="#FF0000">//handle_signal method.</FONT>
+
+<P>class
+<BR>MyEventHandler: public ACE_Event_Handler{
+<BR>int
+<BR>handle_signal(int signum, siginfo_t*,ucontext_t*){
+<BR>&nbsp;switch(signum){
+<BR>&nbsp; case SIGWINCH:
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG, "You pressed SIGWINCH \n"));
+<BR>&nbsp;&nbsp; break;
+
+<P>&nbsp; case SIGINT:
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG, "You pressed SIGINT \n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp;&nbsp; }
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+<BR>};
+
+<P>int main(int argc, char *argv[]){
+<BR><FONT COLOR="#FF0000">&nbsp;//instantiate the handler</FONT>
+<BR>&nbsp;MyEventHandler *eh =new MyEventHandler;
+
+<P><FONT COLOR="#FF0000">//Register the handler asking to call back when
+either SIGWINCH</FONT>
+<BR><FONT COLOR="#FF0000">//or SIGINT signals occur. Note that in both
+the cases we asked the</FONT>
+<BR><FONT COLOR="#FF0000">//Reactor to call back the same Event_Handler
+i.e., MyEventHandler.</FONT>
+<BR><FONT COLOR="#FF0000">//This is the reason why we had to write a switch
+statement in the handle_signal()</FONT>
+<BR><FONT COLOR="#FF0000">//method above. Also note that the</FONT>
+<BR><FONT COLOR="#FF0000">//ACE_Reactor is being used as a Singleton object&nbsp;
+(Singleton pattern)</FONT>
+
+<P>&nbsp;ACE_Reactor::instance()->register_handler(SIGWINCH,eh);
+<BR>&nbsp;ACE_Reactor::instance()->register_handler(SIGINT,eh);
+<BR>&nbsp;while(1)
+<BR>&nbsp;<FONT COLOR="#FF0000"> //Start the reactors event loop</FONT>
+<BR>&nbsp; ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+<BR>&nbsp;
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_5/ex02.html b/docs/tutorials/Chap_5/ex02.html
new file mode 100644
index 00000000000..89f5094b9c7
--- /dev/null
+++ b/docs/tutorials/Chap_5/ex02.html
@@ -0,0 +1,148 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Reactor" (Event
+Management)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 2</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">PORT_NO
+19998</FONT>
+<BR>typedef ACE_SOCK_Acceptor Acceptor;
+<BR><FONT COLOR="#FF0000">//forward declaration</FONT>
+<BR>class My_Accept_Handler;
+
+<P>class
+<BR>My_Input_Handler: public ACE_Event_Handler{
+<BR>public:
+<BR><FONT COLOR="#FF0000">&nbsp;//Constructor</FONT>
+<BR>&nbsp;My_Input_Handler(){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,?Constructor\n?);
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Called back to handle any input receieved</FONT>
+<BR>&nbsp;int
+<BR>&nbsp;handle_input(ACE_HANDLE){
+<BR><FONT COLOR="#FF0000">&nbsp; //receive the data</FONT>
+<BR>&nbsp; peer().recv_n(data,12);
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,?%s\n?,data));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000"> // do something with the input received.</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp; // ...</FONT>
+
+<P><FONT COLOR="#FF0000">&nbsp; //keep yourself registered with the reactor</FONT>
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Used by the reactor to determine the
+underlying handle</FONT>
+<BR>&nbsp;ACE_HANDLE
+<BR>&nbsp;get_handle()const {
+<BR>&nbsp; return this->peer_i().get_handle();
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Returns a reference to the underlying
+stream.</FONT>
+<BR>&nbsp;ACE_SOCK_Stream &amp;
+<BR>&nbsp;peer_i(){
+<BR>&nbsp; return this->peer_;
+<BR>&nbsp; }
+
+<P>private:
+<BR>&nbsp;ACE_SOCK_Stream peer_;
+<BR>&nbsp;char data [12];
+<BR>};
+<BR>&nbsp;
+
+<P>class
+<BR>My_Accept_Handler: public ACE_Event_Handler{
+<BR>public:
+<BR><FONT COLOR="#FF0000">//Constructor</FONT>
+<BR>&nbsp;My_Accept_Handler(ACE_Addr &amp;addr){
+<BR>&nbsp; this->open(addr);
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">//Open the peer_acceptor so it starts to ?listen?</FONT>
+<BR><FONT COLOR="#FF0000">//for incoming clients.</FONT>
+<BR>&nbsp;int
+<BR>&nbsp;open(ACE_Addr &amp;addr){
+<BR>&nbsp; peer_acceptor.open(addr);
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">//Overload the handle input method</FONT>
+<BR>&nbsp;int
+<BR>&nbsp;handle_input(ACE_HANDLE handle){
+<BR>&nbsp;<FONT COLOR="#FF0000"> //Client has requested connection to server.</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp; //Create a handler to handle the connection</FONT>
+<BR>&nbsp; My_Input_Handler *eh= new My_Input_Handler();
+
+<P>&nbsp; <FONT COLOR="#FF0000">//Accept the connection ?into? the Event
+Handler</FONT>
+<BR>&nbsp; if (this->peer_acceptor.accept (eh->peer (), <FONT COLOR="#FF0000">//
+stream</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, <FONT COLOR="#FF0000">// remote address</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, <FONT COLOR="#FF0000">// timeout</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1) ==-1) <FONT COLOR="#FF0000">//restart
+if interrupted</FONT>
+<BR>&nbsp;&nbsp;&nbsp; ACE_DEBUG((LM_ERROR,"Error in connection\n"));
+
+<P>&nbsp; ACE_DEBUG((LM_DEBUG,"Connection established\n"));
+
+<P><FONT COLOR="#FF0000">&nbsp; //Register the input event handler for
+reading</FONT>
+<BR>&nbsp; ACE_Reactor::instance()->
+<BR>&nbsp;&nbsp; register_handler(eh,ACE_Event_Handler::READ_MASK);
+
+<P><FONT COLOR="#FF0000">&nbsp; //Unregister as the acceptor is not expecting
+new clients</FONT>
+<BR>&nbsp; return -1;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF6666">&nbsp;//Used by the reactor to determine the underlying
+handle</FONT>
+<BR>&nbsp;ACE_HANDLE
+<BR>&nbsp;get_handle(void) const{
+<BR>&nbsp; return this->peer_acceptor.get_handle();
+<BR>&nbsp; }
+<BR>private:
+<BR>&nbsp;Acceptor peer_acceptor;
+<BR>};
+
+<P>int main(int argc, char * argv[]){
+<BR><FONT COLOR="#FF0000">&nbsp;//Create an address on which to receive
+connections</FONT>
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NO);
+
+<P><FONT COLOR="#FF0000">//Create the Accept Handler which automatically
+begins to "listen"</FONT>
+<BR><FONT COLOR="#FF0000">//for client requests for connections</FONT>
+<BR>&nbsp;My_Accept_Handler *eh=new My_Accept_Handler(addr);
+
+<P><FONT COLOR="#FF0000">//Register the reactor to call back when incoming
+client connects</FONT>
+<BR>ACE_Reactor::instance()->register_handler(eh,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_Event_Handler::ACCEPT_MASK);
+
+<P><FONT COLOR="#FF0000">//Start the event loop</FONT>
+<BR>while(1)
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex03.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_5/ex03.html b/docs/tutorials/Chap_5/ex03.html
new file mode 100644
index 00000000000..07dabd17a97
--- /dev/null
+++ b/docs/tutorials/Chap_5/ex03.html
@@ -0,0 +1,86 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 3</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Reactor" (Event
+Management)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#FF0000">//Example 3</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Timer_Queue.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">NUMBER_TIMERS
+10</FONT>
+
+<P>static int done = 0;
+<BR>static int count = 0;
+
+<P>class Time_Handler : public ACE_Event_Handler
+<BR>{
+<BR>public:
+<BR>&nbsp;<FONT COLOR="#FF0000">//Method which is called back by the Reactor
+when timeout occurs.</FONT>
+<BR>&nbsp;virtual int handle_timeout (const ACE_Time_Value &amp;tv,
+<BR>&nbsp;const void *arg){
+<BR>&nbsp; long current_count = long (arg);
+<BR>&nbsp; ACE_ASSERT (current_count == count);
+<BR>&nbsp; ACE_DEBUG ((LM_DEBUG, "%d: Timer #%d timed out at %d!\n",
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; count, current_count, tv.sec()));
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Increment count</FONT>
+<BR>&nbsp; count ++;
+
+<P><FONT COLOR="#FF0000">//Make sure assertion doesnt fail for missing
+5th timer.</FONT>
+<BR>&nbsp; if (count ==5)
+<BR>&nbsp;&nbsp; count++;
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp; //If all timers done then set done flag</FONT>
+<BR>&nbsp; if (current_count == NUMBER_TIMERS - 1)
+<BR>&nbsp;&nbsp; done = 1;
+<BR><FONT COLOR="#FF0000">&nbsp; //Keep yourself registered with the Reactor.</FONT>
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>};
+
+<P>int
+<BR>main (int, char *[])
+<BR>{
+<BR>&nbsp;ACE_Reactor reactor;
+<BR>&nbsp;Time_Handler *th=new Time_Handler;
+<BR>&nbsp;int timer_id[NUMBER_TIMERS];
+<BR>&nbsp;int i;
+
+<P>&nbsp;for (i = 0; i &lt; NUMBER_TIMERS; i++)
+<BR>&nbsp; timer_id[i] = reactor.schedule_timer (th,
+<BR>&nbsp;&nbsp; (const void *) i, <FONT COLOR="#FF0000">// argument sent
+to handle_timeout()</FONT>
+<BR>&nbsp;&nbsp; ACE_Time_Value (2 * i + 1));<FONT COLOR="#FF0000"> //set
+timer to go off with delay</FONT>
+
+<P><FONT COLOR="#CC0000">&nbsp;//Cancel the fifth timer before it goes
+off</FONT>
+<BR>&nbsp;reactor.cancel_timer(timer_id[5]);<FONT COLOR="#FF0000">//Timer
+ID of timer to be removed</FONT>
+
+<P>&nbsp;while (!done)
+<BR>&nbsp; reactor.handle_events ();
+
+<P>&nbsp;return 0;
+<BR>}
+
+<P>&nbsp;<A HREF="ex04.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_5/ex04.html b/docs/tutorials/Chap_5/ex04.html
new file mode 100644
index 00000000000..e0d0181d14d
--- /dev/null
+++ b/docs/tutorials/Chap_5/ex04.html
@@ -0,0 +1,84 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 4</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Reactor" (Event
+Management)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#FF0000">//Example 4</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Event_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread_Manager.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">WAIT_TIME
+1</FONT>
+<BR><FONT COLOR="#000099">#define</FONT><FONT COLOR="#663366"> SLEEP_TIME
+2</FONT>
+
+<P>class My_Handler: public ACE_Event_Handler{
+<BR>&nbsp;public:
+
+<P><FONT COLOR="#FF0000">&nbsp;//Start the event handling process.</FONT>
+<BR>&nbsp;My_Handler(){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Event Handler created\n"));
+<BR>&nbsp; ACE_Reactor::instance()->max_notify_iterations(5);
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">//Perform the notifications i.e., notify the reactor
+10 times</FONT>
+<BR>&nbsp;void perform_notifications(){
+<BR>&nbsp; for(int i=0;i&lt;10;i++)
+<BR>&nbsp;&nbsp; ACE_Reactor::instance()->
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; notify(this,ACE_Event_Handler::READ_MASK);
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//The actual handler which in this case
+will handle the notifications</FONT>
+<BR>&nbsp;int handle_input(int){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Got notification # %d\n",no));
+<BR>&nbsp; no++;
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>private:
+<BR>&nbsp;static int no;
+<BR>};
+
+<P><FONT COLOR="#FF0000">//Static members</FONT>
+<BR>int My_Handler::no=1;
+<BR>&nbsp;
+
+<P>int main(int argc, char *argv[]){
+<BR><FONT COLOR="#FF0000">&nbsp; //Instantiating the handler</FONT>
+<BR>&nbsp;My_Handler handler;
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//The done flag is set to not done yet.</FONT>
+<BR>&nbsp;int done=0;
+
+<P>while(1){
+<BR>&nbsp;<FONT COLOR="#FF0000"> //After WAIT_TIME the handle_events will
+fall through if no events arrive.</FONT>
+<BR>&nbsp; ACE_Reactor::instance()->handle_events(ACE_Time_Value(WAIT_TIME));
+<BR>&nbsp; if(!done){
+<BR>&nbsp;&nbsp; handler.perform_notifications();
+<BR>&nbsp;&nbsp; done=1;
+<BR>&nbsp;&nbsp; }
+<BR>&nbsp; sleep(SLEEP_TIME);
+<BR>&nbsp;}
+<BR>}
+
+<P>&nbsp;<A HREF="ex05.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_5/ex05.html b/docs/tutorials/Chap_5/ex05.html
new file mode 100644
index 00000000000..665730fcace
--- /dev/null
+++ b/docs/tutorials/Chap_5/ex05.html
@@ -0,0 +1,87 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 5</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Reactor" (Event
+Management)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 5</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Event_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch_T.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread_Manager.h"</FONT>
+
+<P>class My_Handler: public ACE_Event_Handler{
+<BR>public:
+<BR><FONT COLOR="#FF0000">&nbsp;//Start the event handling process.</FONT>
+<BR>&nbsp;My_Handler(){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Got open\n"));
+<BR>&nbsp; activate_threads();
+<BR>&nbsp; ACE_Reactor::instance()->max_notify_iterations(5);
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">//Spawn a separate thread so that it notifies
+the reactor</FONT>
+<BR>&nbsp;void activate_threads(){
+<BR>&nbsp; ACE_Thread_Manager::instance()
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; ->spawn((ACE_THR_FUNC)svc_start,(void*)this);
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Notify the Reactor 10 times.</FONT>
+<BR>&nbsp;void svc(){
+<BR>&nbsp; for(int i=0;i&lt;10;i++)
+<BR>&nbsp;&nbsp; ACE_Reactor::instance()
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; ->notify(this, ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;&nbsp; }
+
+<P><FONT COLOR="#FF0000">//The actual handler which in this case will handle
+the notifications</FONT>
+<BR>&nbsp;int handle_input(int){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG, ?Got notification # %d\n?, no));
+<BR>&nbsp; no++;
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+
+<P>&nbsp;<FONT COLOR="#FF0000">//The entry point for the new thread that
+is to be created.</FONT>
+<BR>&nbsp;static int svc_start(void* arg);
+<BR>private:
+<BR>&nbsp;static int no;
+<BR>};
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Static members</FONT>
+<BR>int My_Handler::no=1;
+<BR>int My_Handler::svc_start(void* arg){
+<BR>&nbsp;My_Handler *eh= (My_Handler*)arg;
+<BR>&nbsp;eh->svc();
+<BR>&nbsp;return -1; <FONT COLOR="#FF0000">//de-register from the reactor</FONT>
+<BR>&nbsp;}
+
+<P>int main(int argc, char *argv[]){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Starting test \n"));
+<BR>&nbsp;My_Handler handler;
+
+<P>&nbsp;while(1){
+<BR>&nbsp; ACE_Reactor::instance()->handle_events();
+<BR>&nbsp; sleep(3);
+<BR>&nbsp; }
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;
+<BR>&nbsp; <A HREF="../Chap_6/ex01.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/Chap_6.zip b/docs/tutorials/Chap_6/Chap_6.zip
new file mode 100644
index 00000000000..fcfd5455cba
--- /dev/null
+++ b/docs/tutorials/Chap_6/Chap_6.zip
Binary files differ
diff --git a/docs/tutorials/Chap_6/ex01.html b/docs/tutorials/Chap_6/ex01.html
new file mode 100644
index 00000000000..ff60ea6dcb7
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex01.html
@@ -0,0 +1,81 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 1</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#FF0000">//Example 1</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include </FONT><FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Create a Service Handler whose open() method
+will be called back automatically.</FONT>
+<BR><FONT COLOR="#FF0000">//This class MUST derive from ACE_Svc_Handler
+which is an interface and</FONT>
+<BR><FONT COLOR="#FF0000">//as can be seen is a template container class
+itself. The first parameter to //ACE_Svc_Handler is the underlying stream
+that it may use for communication.</FONT>
+<BR><FONT COLOR="#FF0000">//Since we are using TCP sockets the stream is
+ACE_SOCK_STREAM.</FONT>
+<BR><FONT COLOR="#FF0000">//The second is the internal synchronization
+mechanism it could use.</FONT>
+<BR><FONT COLOR="#FF0000">//Since we have a single threaded application
+we pass it a "null" lock</FONT>
+<BR><FONT COLOR="#FF0000">//which will do nothing.</FONT>
+
+<P>class My_Svc_Handler:
+<BR>&nbsp;public ACE_Svc_Handler &lt;ACE_SOCK_STREAM,ACE_NULL_SYNCH>{
+<BR><FONT COLOR="#FF0000">//the open method which will be called back automatically
+after the</FONT>
+<BR><FONT COLOR="#FF0000">//connection has been established</FONT>.
+
+<P>public:
+<BR>int open(void*){
+<BR>&nbsp;cout&lt;&lt;?Connection established?&lt;&lt;endl;
+<BR>&nbsp;}
+<BR>};
+<BR><FONT COLOR="#FF0000">// Create the acceptor as described above.</FONT>
+<BR>typedef ACE_Acceptor&lt;My_Svc_Handler,ACE_SOCK_ACCEPTOR> MyAcceptor;
+
+<P>int main(int argc, char* argv[]){
+<BR><FONT COLOR="#FF0000">//create the&nbsp; address on which we wish to
+connect. The constructor takes</FONT>
+<BR><FONT COLOR="#FF0000">//the port number on which to listen and will
+automatically take the hosts</FONT>
+<BR><FONT COLOR="#FF0000">//IP address as the IP Address for the addr object</FONT>
+
+<P>ACE_INET_Addr addr(PORT_NUM);
+
+<P><FONT COLOR="#FF0000">//instantiate the appropriate acceptor object
+with the address on which we wish to</FONT>
+<BR><FONT COLOR="#FF0000">//accept and the Reactor instance we want to
+use. In this case we just use the global</FONT>
+<BR><FONT COLOR="#FF0000">//ACE_Reactor singleton. (Read more about the
+reactor in the previous chapter)</FONT>
+<BR>MyAcceptor acceptor(address, ACE_Reactor::instance());
+
+<P>while(1)
+<BR><FONT COLOR="#FF0000">&nbsp;// Start the reactors event loop</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+<BR>&nbsp;
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex02.html b/docs/tutorials/Chap_6/ex02.html
new file mode 100644
index 00000000000..a5ab4cca339
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex02.html
@@ -0,0 +1,94 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 2</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">PORT_NUM
+10101</FONT>
+<BR><FONT COLOR="#000099">#define</FONT><FONT COLOR="#663366"> DATA_SIZE
+12</FONT>
+
+<P><FONT COLOR="#FF0000">//forward declaration</FONT>
+<BR>class My_Svc_Handler;
+
+<P><FONT COLOR="#FF0000">//Create the Acceptor class</FONT>
+<BR>typedef ACE_Acceptor&lt;My_Svc_Handler,ACE_SOCK_ACCEPTOR> MyAcceptor;
+
+<P><FONT COLOR="#FF0000">//Create a service handler similar to as seen
+in example 1.</FONT>
+<BR><FONT COLOR="#FF0000">//Except this time include the handle_input()
+method which will be</FONT>
+<BR><FONT COLOR="#FF0000">//called back automatically by the reactor when
+new data arrives</FONT>
+<BR><FONT COLOR="#FF0000">//on the newly established connection</FONT>
+<BR>class My_Svc_Handler:
+<BR>&nbsp;public ACE_Svc_Handler &lt;ACE_SOCK_STREAM,ACE_NULL_SYNCH>{
+<BR>public:
+<BR>My_Svc_Handler(){
+<BR>&nbsp;data= new char[DATA_SIZE];
+<BR>&nbsp;}
+<BR>int open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Connection established"));
+
+<P><FONT COLOR="#FF0000">&nbsp;//Register the service handler with the
+reactor</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->register_handler(this,
+<BR>&nbsp;ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>int handle_input(ACE_HANDLE){
+<BR>&nbsp;<FONT COLOR="#FF0000">//After using the peer() method of ACE_Svc_Handler
+to obtain a</FONT>
+<BR><FONT COLOR="#FF0000">//reference to the underlying stream of the service
+handler class</FONT>
+<BR><FONT COLOR="#FF0000">//we call recv_n() on it to read the data which
+has been received.</FONT>
+<BR><FONT COLOR="#FF0000">//This data is stored in the data array and then
+printed out</FONT>
+<BR>&nbsp;peer().recv_n(data,DATA_SIZE);
+<BR>&nbsp;ACE_OS::printf("&lt;&lt; %s\n",data);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//keep yourself registered with the reactor</FONT>
+<BR>&nbsp; return 0;
+<BR>&nbsp;}
+<BR>private:
+<BR>&nbsp;char* data;
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NUM);
+<BR><FONT COLOR="#FF0000">&nbsp;//create the acceptor</FONT>
+<BR>&nbsp;MyAcceptor acceptor(addr, <FONT COLOR="#FF0000">//address to
+accept on</FONT>
+<BR>&nbsp; ACE_Reactor::instance()); <FONT COLOR="#FF0000">//the reactor
+to use</FONT>
+
+<P>while(1)
+<BR><FONT COLOR="#FF0000">&nbsp;//Start the reactor?s event loop</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex03.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex03.html b/docs/tutorials/Chap_6/ex03.html
new file mode 100644
index 00000000000..a68bd303b61
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex03.html
@@ -0,0 +1,50 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 3</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example3</FONT>
+
+<P>class My_Svc_Handler:
+<BR>public ACE_Svc_Handler &lt;ACE_LSOCK_STREAM,ACE_NULL_SYNCH>{
+<BR>public:
+<BR>int open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Connection established"));
+<BR>&nbsp;ACE_Reactor::instance() ->register_handler(this,ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;&nbsp; }
+
+<P>&nbsp;int handle_input(ACE_HANDLE){
+<BR>&nbsp; char* data= new char[DATA_SIZE];
+<BR>&nbsp; peer().recv_n(data,DATA_SIZE);
+<BR>&nbsp; ACE_OS::printf("&lt;&lt; %s\n",data);
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>};
+
+<P>typedef ACE_Acceptor&lt;My_Svc_Handler,ACE_LSOCK_ACCEPTOR> MyAcceptor;
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_UNIX_Addr addr("/tmp/addr.ace");
+<BR>&nbsp;MyAcceptor acceptor(address, ACE_Reactor::instance());
+
+<P>while(1) <FONT COLOR="#FF0000">/* Start the reactors event loop */</FONT>
+<BR>&nbsp; ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex04.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex04.html b/docs/tutorials/Chap_6/ex04.html
new file mode 100644
index 00000000000..f5910341621
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex04.html
@@ -0,0 +1,44 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 4</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 4 (Use in conjunction with other examples
+to create running example)</FONT><FONT COLOR="#CC0000"></FONT>
+
+<P>typedef ACE_Connector&lt;My_Svc_Handler,ACE_SOCK_CONNECTOR> MyConnector;
+
+<P>int main(int argc, char * argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NO,HOSTNAME);
+<BR>&nbsp;My_Svc_Handler * handler= new My_Svc_Handler;
+
+<P><FONT COLOR="#FF0000">//Create the connector</FONT>
+<BR>&nbsp;MyConnector connector;
+
+<P><FONT COLOR="#FF0000">//Connects to remote machine</FONT>
+<BR>&nbsp;if(connector.connect(handler,addr)==-1)
+<BR>&nbsp; ACE_ERROR(LM_ERROR,?%P|%t, %p?,?Connection failed?);
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">//Registers with the Reactor</FONT>
+<BR>&nbsp;while(1)
+<BR>&nbsp; ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex05.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex05.html b/docs/tutorials/Chap_6/ex05.html
new file mode 100644
index 00000000000..c983e5751f9
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex05.html
@@ -0,0 +1,129 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 5</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 5</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Thread.h"</FONT>
+
+<P><FONT COLOR="#FF0000">//Add our own Reactor singleton</FONT>
+<BR>typedef ACE_Singleton&lt;ACE_Reactor,ACE_Null_Mutex> Reactor;
+<BR><FONT COLOR="#FF0000">//Create an Acceptor</FONT>
+<BR>typedef ACE_Acceptor&lt;MyServiceHandler,ACE_SOCK_ACCEPTOR> Acceptor;
+<BR><FONT COLOR="#FF0000">//Create a Connector</FONT>
+<BR>typedef ACE_Connector&lt;MyServiceHandler,ACE_SOCK_CONNECTOR> Connector;
+
+<P>class MyServiceHandler:
+<BR>public ACE_Svc_Handler&lt;ACE_SOCK_STREAM,ACE_NULL_SYNCH>{
+<BR>public:
+<BR><FONT COLOR="#FF0000">&nbsp;//Used by the two threads "globally" to
+determine their peer stream</FONT>
+<BR>&nbsp;static ACE_SOCK_Stream* Peer;
+
+<P><FONT COLOR="#FF0000">//Thread ID used to identify the threads</FONT>
+<BR>&nbsp;ACE_thread_t t_id;
+
+<P>int open(void*){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"Acceptor: received new connection\n"));
+
+<P><FONT COLOR="#FF0000">//Register with the reactor to remember this handlle</FONT>
+<BR>&nbsp; Reactor::instance() ->register_handler(this,ACE_Event_Handler::READ_MASK);
+
+<P><FONT COLOR="#FF0000">//Determine the peer stream and record it globally</FONT>
+<BR>&nbsp; MyServiceHandler::Peer=&amp;peer();
+<BR>&nbsp;
+<BR>&nbsp; <FONT COLOR="#FF0000">//Spawn new thread to send string every
+second</FONT>
+<BR>&nbsp; ACE_Thread::spawn((ACE_THR_FUNC)send_data,0,THR_NEW_LWP,&amp;t_id);
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000"> //keep the service handler registered
+by returning 0 to the reactor</FONT>
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>&nbsp;
+
+<P>static void* send_data(void*){
+<BR>&nbsp; while(1){
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Hello World\n"));
+<BR>&nbsp;&nbsp; Peer->send_n("Hello World",sizeof("Hello World"));
+<BR>&nbsp;
+<BR>&nbsp;&nbsp; <FONT COLOR="#FF0000">//Go to sleep for a second before
+sending again</FONT>
+<BR>&nbsp;&nbsp; ACE_OS::sleep(1);
+<BR>&nbsp;&nbsp;&nbsp; }
+<BR>&nbsp; return 0;
+<BR>&nbsp; }
+<BR>&nbsp;
+
+<P>int handle_input(ACE_HANDLE){
+<BR>&nbsp; char* data= new char[12];
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000"> //Check if peer aborted the connection</FONT>
+<BR>&nbsp; if(Peer.recv_n(data,12)==0){
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Peer probably aborted connection\n"));
+<BR>&nbsp;&nbsp; ACE_Thread::cancel(t_id); <FONT COLOR="#CC0000">//kill
+sending thread ..</FONT>
+<BR>&nbsp;&nbsp; return -1; <FONT COLOR="#FF0000">//de-register from the
+Reactor.</FONT>
+<BR>&nbsp;&nbsp; }
+
+<P>&nbsp;<FONT COLOR="#FF0000"> //Show what you got..</FONT>
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"&lt;&lt; %s\n",data));
+<BR>&nbsp;
+<BR>&nbsp; <FONT COLOR="#FF0000">//keep yourself registered</FONT>
+<BR>&nbsp; return 0;
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
+<BR>};
+
+<P><FONT COLOR="#FF0000">//Global stream identifier used by both threads</FONT>
+<BR>ACE_SOCK_Stream * MyServiceHandler::Peer=0;
+<BR>&nbsp;
+
+<P>void main_accept(){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NO);
+<BR>&nbsp;Acceptor myacceptor(addr,Reactor::instance());
+<BR>&nbsp;while(1)
+<BR>&nbsp; Reactor::instance()->handle_events();
+
+<P>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>void main_connect(){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NO,HOSTNAME);
+<BR>&nbsp;Connector myconnector;
+<BR>&nbsp;myconnector.connect(my_svc_handler,addr);
+<BR>&nbsp;while(1)
+<BR>&nbsp; Reactor::instance()->handle_events();
+
+<P>&nbsp;}
+<BR>&nbsp;
+
+<P>int main(int argc, char* argv[]){
+<BR><FONT COLOR="#FF0000">&nbsp;// Use ACE_Get_Opt to parse and obtain
+arguments and then call the</FONT>
+<BR>&nbsp;<FONT COLOR="#FF0000">// approriate function for accept or connect.</FONT>
+<BR><FONT COLOR="#CC0000">//...</FONT>
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;<A HREF="ex06.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex06.html b/docs/tutorials/Chap_6/ex06.html
new file mode 100644
index 00000000000..7bfc3b91beb
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex06.html
@@ -0,0 +1,134 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 6</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 6</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+
+<P>class MyServiceHandler; //forward declaration
+<BR>typedef ACE_Singleton&lt;ACE_Reactor,ACE_Null_Mutex> Reactor;
+<BR>typedef ACE_Acceptor&lt;MyServiceHandler,ACE_SOCK_ACCEPTOR> Acceptor;
+
+<P>class MyServiceHandler:
+<BR>public ACE_Svc_Handler&lt;ACE_SOCK_STREAM,ACE_MT_SYNCH>{
+<BR><FONT COLOR="#FF0000">// The two thread names are kept here</FONT>
+<BR>ACE_thread_t thread_names[2];
+
+<P>public:
+<BR>int open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG, "Acceptor: received new connection \n"));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Register with the reactor to remember
+this handler..</FONT>
+<BR>&nbsp;Reactor::instance() ->register_handler(this,ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Acceptor: ThreadID:(%t) open\n"));
+
+<P><FONT COLOR="#CC0000">&nbsp;//Create two new threads to create and send
+messages to the remote machine.</FONT>
+<BR>&nbsp;activate(THR_NEW_LWP,
+<BR>&nbsp;&nbsp; 2, <FONT COLOR="#FF0000">//2 new threads</FONT>
+<BR>&nbsp;&nbsp; 0, <FONT COLOR="#FF0000">//force active false, if already
+created dont try again.</FONT>
+<BR>&nbsp;&nbsp; ACE_DEFAULT_THREAD_PRIORITY,<FONT COLOR="#FF0000">//Use
+default thread priority</FONT>
+<BR>&nbsp;&nbsp; -1,
+<BR>&nbsp;&nbsp; this,<FONT COLOR="#FF0000">//Which ACE_Task object to
+create? In this case this one.</FONT>
+<BR>&nbsp;&nbsp; 0,<FONT COLOR="#FF0000">// dont care about thread handles
+used</FONT>
+<BR>&nbsp;&nbsp; 0,<FONT COLOR="#FF0000">// dont care about where stacks
+are created</FONT>
+<BR>&nbsp;&nbsp; 0,<FONT COLOR="#FF0000">//dont care about stack sizes</FONT>
+<BR>&nbsp;&nbsp; thread_names); <FONT COLOR="#FF0000">// keep identifiers
+in thread_names</FONT>
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//keep the service handler registered with
+the acceptor.</FONT>
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>void send_message1(void){
+<BR>&nbsp;<FONT COLOR="#FF0000">//Send message type 1</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Sending message >>"));
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Send the data to the remote peer</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Sent message1"));
+<BR>&nbsp;peer().send_n("Message1",LENGTH_MSG_1);
+<BR>&nbsp;} <FONT COLOR="#FF0000">//end send_message1</FONT>
+
+<P>int send_message2(void){
+<BR>&nbsp;<FONT COLOR="#FF0000">//Send message type 1</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Sending message >>"));
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Send the data to the remote peer</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Sent Message2"));
+<BR>&nbsp;peer().send_n("Message2",LENGTH_MSG_2);
+<BR>&nbsp;}<FONT COLOR="#FF0000">//end send_message_2</FONT>
+<BR>&nbsp;
+<BR>int svc(void){
+<BR>&nbsp;ACE_DEBUG( (LM_DEBUG,?(%t) Svc thread \n?));
+<BR>&nbsp;
+<BR>&nbsp;if(ACE_Thread::self()== thread_names[0])
+<BR>&nbsp; while(1) send_message1(); <FONT COLOR="#FF0000">//send message
+1s forever</FONT>
+<BR>&nbsp;else
+<BR>&nbsp; while(1) send_message2(); <FONT COLOR="#FF0000">//send message
+2s forever</FONT>
+<BR>&nbsp;return 0; <FONT COLOR="#FF0000">// keep the compiler happy.</FONT>
+<BR>}
+<BR>&nbsp;
+<BR>int handle_input(ACE_HANDLE){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,?(%t) handle_input ::?));
+<BR>&nbsp;char* data= new char[13];
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Check if peer aborted the connection</FONT>
+<BR>&nbsp;if(peer().recv_n(data,12)==0){
+<BR>&nbsp; ACE_OS::printf("Peer probably aborted connection\n");
+<BR>&nbsp; return -1; <FONT COLOR="#FF0000">//de-register from the Reactor.</FONT>
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Show what you got..</FONT>
+<BR>&nbsp;ACE_OS::printf("&lt;&lt; %s\n",data);
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//keep yourself registered</FONT>
+<BR>&nbsp;return 0;
+<BR>&nbsp;
+<BR>&nbsp;}
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(10101);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread: (%t) main\n"));
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Prepare to accept connections</FONT>
+<BR>&nbsp;Acceptor myacceptor(addr,Reactor::instance());
+
+<P><FONT COLOR="#FF0000">&nbsp;// wait for something to happen.</FONT>
+<BR>&nbsp;while(1)
+<BR>&nbsp; Reactor::instance()->handle_events();
+<BR>&nbsp;
+<BR>&nbsp;return 0;
+<BR>}
+
+<P>&nbsp;<A HREF="ex07.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex07.html b/docs/tutorials/Chap_6/ex07.html
new file mode 100644
index 00000000000..7ecf0e57bb3
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex07.html
@@ -0,0 +1,173 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 7</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 7</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include </FONT><FONT COLOR="#006600">"ace/Thread.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">NETWORK_SPEED
+3</FONT>
+<BR>class MyServiceHandler;<FONT COLOR="#FF0000"> //forward declaration</FONT>
+<BR>typedef ACE_Singleton&lt;ACE_Reactor,ACE_Null_Mutex> Reactor;
+<BR>typedef ACE_Acceptor&lt;MyServiceHandler,ACE_SOCK_ACCEPTOR> Acceptor;
+
+<P>class MyServiceHandler:
+<BR>public ACE_Svc_Handler&lt;ACE_SOCK_STREAM,ACE_MT_SYNCH>{
+<BR><FONT COLOR="#FF0000">// The message sender and creator threads are
+handled here.</FONT>
+<BR>ACE_thread_t thread_names[2];
+
+<P>public:
+<BR>int open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG, "Acceptor: received new connection \n"));
+
+<P><FONT COLOR="#FF0000">&nbsp;//Register with the reactor to remember
+this handler..</FONT>
+<BR>&nbsp;Reactor::instance() ->register_handler(this,ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Acceptor: ThreadID:(%t) open\n"));
+
+<P><FONT COLOR="#CC0000">&nbsp;//Create two new threads to create and send
+messages to the</FONT>
+<BR><FONT COLOR="#CC0000">&nbsp;//remote machine.</FONT>
+<BR>&nbsp;activate(THR_NEW_LWP,
+<BR>&nbsp;&nbsp; 2, <FONT COLOR="#FF0000">//2 new threads</FONT>
+<BR>&nbsp;&nbsp; 0,
+<BR>&nbsp;&nbsp; ACE_DEFAULT_THREAD_PRIORITY,
+<BR>&nbsp;&nbsp; -1,
+<BR>&nbsp;&nbsp; this,
+<BR>&nbsp;&nbsp; 0,
+<BR>&nbsp;&nbsp; 0,
+<BR>&nbsp;&nbsp; 0,
+<BR>&nbsp;&nbsp; thread_names); <FONT COLOR="#FF0000">// identifiers in
+thread_handles</FONT>
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//keep the service handler registered with
+the acceptor.</FONT>
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>void send_message(void){
+<BR><FONT COLOR="#FF0000">&nbsp;//Dequeue the message and send it off</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Sending message >>"));
+
+<P><FONT COLOR="#FF0000">&nbsp;//dequeue the message from the message queue</FONT>
+<BR>&nbsp;ACE_Message_Block *mb;
+<BR>&nbsp;ACE_ASSERT(this->getq(mb)!=-1);
+<BR>&nbsp;int length=mb->length();
+<BR>&nbsp;char *data =mb->rd_ptr();
+
+<P>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Send the data to the remote peer</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"%s \n",data,length));
+<BR>&nbsp;peer().send_n(data,length);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Simulate very SLOW network.</FONT>
+<BR>&nbsp;ACE_OS::sleep(NETWORK_SPEED);
+
+<P><FONT COLOR="#FF0000">&nbsp;//release the message block</FONT>
+<BR>&nbsp;mb->release();
+<BR>&nbsp;} <FONT COLOR="#FF0000">//end send_message</FONT>
+
+<P>int construct_message(void){
+<BR><FONT COLOR="#FF0000">&nbsp;// A very fast message creation algorithm</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// would lead to the need for queuing messages..</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// here. These messages are created and
+then sent</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// using the SLOW send_message() routine
+which is</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// running in a different thread so that
+the message</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//construction thread isn?t blocked.</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Constructing message >> "));
+
+<P>&nbsp; <FONT COLOR="#FF0000">// Create a new message to send</FONT>
+<BR>&nbsp;ACE_Message_Block *mb;
+<BR>&nbsp;char *data="Hello Connector";
+<BR>&nbsp;ACE_NEW_RETURN (mb,ACE_Message_Block (16,<FONT COLOR="#FF0000">//Message
+16 bytes long</FONT>
+<BR>&nbsp;&nbsp; ACE_Message_Block::MB_DATA,<FONT COLOR="#FF0000">//Set
+header to data</FONT>
+<BR>&nbsp;&nbsp; 0,<FONT COLOR="#FF0000">//No continuations</FONT>.
+<BR>&nbsp;&nbsp; data<FONT COLOR="#FF0000">//The data we want to send</FONT>
+<BR>&nbsp;&nbsp; ), 0);
+<BR>&nbsp;mb->wr_ptr(16); <FONT COLOR="#FF0000">//Set the write pointer.</FONT>
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">// Enqueue the message into the message
+queue</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// we COULD have done a timed wait for
+enqueuing in case</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// someone else holds the lock to the queue
+so it doesn?t block</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//forever..</FONT>
+<BR>&nbsp;ACE_ASSERT(this->putq(mb)!=-1);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Enqueued msg successfully\n"));
+<BR>}
+<BR>&nbsp;
+<BR>int svc(void){
+<BR>&nbsp;ACE_DEBUG( (LM_DEBUG,?(%t) Svc thread \n?));
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//call the message creator thread</FONT>
+<BR>&nbsp;if(ACE_Thread::self()== thread_names[0])
+<BR>&nbsp; while(1) construct_message(); <FONT COLOR="#FF0000">//create
+messages forever</FONT>
+<BR>&nbsp;else
+<BR>&nbsp; while(1) send_message(); <FONT COLOR="#FF0000">//send messages
+forever</FONT>
+<BR>&nbsp;return 0; <FONT COLOR="#FF0000">// keep the compiler happy.</FONT>
+<BR>}
+<BR>&nbsp;
+<BR>int handle_input(ACE_HANDLE){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t) handle_input "));
+<BR>&nbsp;char* data= new char[13];
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Check if peer aborted the connection</FONT>
+<BR>&nbsp;if(peer().recv_n(data,12)==0){
+<BR>&nbsp; ACE_OS::printf("Peer probably aborted connection");
+<BR>&nbsp; return -1; <FONT COLOR="#FF0000">//de-register from the Reactor.</FONT>
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Show what you got..</FONT>
+<BR>&nbsp;ACE_OS::printf("&lt;&lt; %s\n",data);
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//keep yourself registered</FONT>
+<BR>&nbsp;return 0;
+<BR>&nbsp;
+<BR>&nbsp;}
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(10101);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Thread: (%t) main\n"));
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Prepare to accept connections</FONT>
+<BR>&nbsp;Acceptor myacceptor(addr,Reactor::instance());
+
+<P><FONT COLOR="#FF0000">&nbsp;// wait for something to happen.</FONT>
+<BR>&nbsp;while(1)
+<BR>&nbsp; Reactor::instance()->handle_events();
+<BR>&nbsp;
+<BR>&nbsp;return 0;
+<BR>}
+
+<P>&nbsp;<A HREF="ex08.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex08.html b/docs/tutorials/Chap_6/ex08.html
new file mode 100644
index 00000000000..d90c00fbd67
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex08.html
@@ -0,0 +1,96 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 8</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 8</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT><FONT COLOR="#663366"> PORT_NUM
+10101</FONT>
+<BR><FONT COLOR="#000099">#define</FONT><FONT COLOR="#663366"> DATA_SIZE
+12</FONT><FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">//forward declaration</FONT>
+<BR>class My_Svc_Handler;<FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">//instantiate a strategy acceptor</FONT>
+<BR>typedef ACE_Strategy_Acceptor&lt;My_Svc_Handler,ACE_SOCK_ACCEPTOR>
+MyAcceptor;<FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">//instantiate a concurrency strategy</FONT>
+<BR>typedef ACE_Process_Strategy&lt;My_Svc_Handler> Concurrency_Strategy;
+
+<P><FONT COLOR="#FF0000">// Define the Service Handler</FONT>
+<BR>class My_Svc_Handler:
+<BR>&nbsp;public ACE_Svc_Handler &lt;ACE_SOCK_STREAM,ACE_NULL_SYNCH>{
+<BR>private:
+<BR>&nbsp;&nbsp;&nbsp; char* data;
+<BR>public:
+<BR>&nbsp;&nbsp;&nbsp; My_Svc_Handler(){
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data= new char[DATA_SIZE];
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
+<BR>&nbsp;&nbsp;&nbsp; My_Svc_Handler(ACE_Thread_Manager* tm){
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data= new char[DATA_SIZE];
+<BR>&nbsp;&nbsp;&nbsp; }
+<BR>&nbsp;&nbsp;&nbsp; int open(void*){
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Connection
+established\n"));
+<BR><FONT COLOR="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+//Register with the reactor</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_Reactor::instance()->register_handler(this,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; }
+
+<P>&nbsp;&nbsp;&nbsp; int handle_input(ACE_HANDLE){
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; peer().recv_n(data,DATA_SIZE);
+<BR>&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::printf(?&lt;&lt; %s\n?,data);
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;&nbsp;&nbsp; // keep yourself registered
+with the reactor</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;
+<BR>&nbsp;&nbsp;&nbsp; }
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NUM);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Concurrency Strategy</FONT>
+<BR>&nbsp;Concurrency_Strategy my_con_strat;
+
+<P><FONT COLOR="#FF0000">//Instantiate the acceptor</FONT>
+<BR>&nbsp;MyAcceptor acceptor(addr, <FONT COLOR="#FF0000">//address to
+accept on</FONT>
+<BR>&nbsp; ACE_Reactor::instance(), <FONT COLOR="#FF0000">//the reactor
+to use</FONT>
+<BR>&nbsp; 0, <FONT COLOR="#FF0000">// dont care about creation strategy</FONT>
+<BR>&nbsp; 0, <FONT COLOR="#FF0000">// dont care about connection estb.
+strategy</FONT>
+<BR>&nbsp; &amp;my_con_strat);<FONT COLOR="#FF0000"> // use our new process
+concurrency strategy</FONT>
+
+<P>while(1)<FONT COLOR="#FF0000"> // Start the reactors event loop</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P>&nbsp;<A HREF="ex09.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex09.html b/docs/tutorials/Chap_6/ex09.html
new file mode 100644
index 00000000000..e641da20bc5
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex09.html
@@ -0,0 +1,211 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 9</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 9</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#663366"> </FONT><FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Connector.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Connector.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/INET_Addr.h"</FONT>
+
+<P><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">PORT_NUM
+10101</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">DATA_SIZE
+16</FONT>
+
+<P><FONT COLOR="#FF0000">//forward declaration</FONT>
+<BR>class My_Svc_Handler;
+<BR><FONT COLOR="#FF0000">//Function prototype</FONT>
+<BR>static void make_connections(void *arg);
+
+<P><FONT COLOR="#FF0000">// Template specializations for the hashing function
+for the</FONT>
+<BR><FONT COLOR="#FF0000">// hash_map which is used by the cache. The cache
+is used internally by the</FONT>
+<BR><FONT COLOR="#FF0000">// Cached Connection Strategy . Here we use ACE_Hash_Addr</FONT>
+<BR><FONT COLOR="#FF0000">// as our external identifier. This utility class
+has already</FONT>
+<BR><FONT COLOR="#FF0000">// overloaded the == operator and the hash()
+method. (The</FONT>
+<BR><FONT COLOR="#FF0000">// hashing function). The hash() method delgates
+the work to</FONT>
+<BR><FONT COLOR="#FF0000">// hash_i() and we use the IP address and port
+to get a</FONT>
+<BR><FONT COLOR="#FF0000">// a unique integer hash value.</FONT>
+<BR>size_t
+<BR>ACE_Hash_Addr&lt;ACE_INET_Addr>::hash_i (const ACE_INET_Addr &amp;addr)
+const
+<BR>{
+<BR>&nbsp; return addr.get_ip_address () + addr.get_port_number ();
+<BR>}
+
+<P><FONT COLOR="#FF0000">//instantiate a strategy acceptor</FONT>
+<BR>typedef ACE_Strategy_Connector&lt;My_Svc_Handler,ACE_SOCK_CONNECTOR>
+<BR>STRATEGY_CONNECTOR;
+
+<P><FONT COLOR="#FF0000">//Instantiate the Creation Strategy</FONT>
+<BR>typedef ACE_NOOP_Creation_Strategy&lt;My_Svc_Handler>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL_CREATION_STRATEGY;
+<BR><FONT COLOR="#FF0000">//Instantiate the Concurrency Strategy</FONT>
+<BR>typedef ACE_NOOP_Concurrency_Strategy&lt;My_Svc_Handler>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL_CONCURRENCY_STRATEGY;
+<BR><FONT COLOR="#FF0000">//Instantiate the Connection Strategy</FONT>
+<BR>typedef ACE_Cached_Connect_Strategy&lt;My_Svc_Handler,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ACE_SOCK_CONNECTOR,
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ACE_SYNCH_RW_MUTEX>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CACHED_CONNECT_STRATEGY;
+<BR>&nbsp;
+<BR>class My_Svc_Handler:
+<BR>public ACE_Svc_Handler &lt;ACE_SOCK_STREAM,ACE_MT_SYNCH>{
+<BR>private:
+<BR>char* data;
+
+<P>public:
+<BR>My_Svc_Handler(){
+<BR>data= new char[DATA_SIZE];
+<BR>&nbsp;}
+<BR>My_Svc_Handler(ACE_Thread_Manager* tm){
+<BR>data= new char[DATA_SIZE];
+<BR>&nbsp;}
+<BR><FONT COLOR="#FF0000">//Called before the service handler is recycled..</FONT>
+<BR>int
+<BR>recycle (void *a=0){
+<BR>&nbsp;&nbsp; ACE_DEBUG ((LM_DEBUG,
+<BR>&nbsp;&nbsp;&nbsp; "(%P|%t) recycling Svc_Handler %d with handle %d\n",
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+this, this->peer ().get_handle ()));
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>int open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Connection established \n"));
+<BR>&nbsp;
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">&nbsp;//Register the service handler with the
+reactor</FONT>
+<BR>&nbsp;ACE_Reactor::instance() ->register_handler(this,ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;activate(THR_NEW_LWP|THR_DETACHED);
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>int handle_input(ACE_HANDLE){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Got input in thread: (%t) \n"));
+<BR>&nbsp;peer().recv_n(data,DATA_SIZE);
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"&lt;&lt; %s\n",data));
+
+<P>&nbsp;<FONT COLOR="#FF0000">//keep yourself registered with the reactor</FONT>
+<BR>&nbsp;return 0;
+<BR>}
+
+<P>int svc(void){
+<BR><FONT COLOR="#FF0000">&nbsp;//send a few messages and then mark connection
+as idle so that it can be recycled later.</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Started the service routine \n"));
+
+<P>&nbsp;for(int i=0;i&lt;3;i++){
+<BR>&nbsp; ACE_DEBUG((LM_DEBUG,"(%t)>>Hello World\n"));
+<BR>&nbsp; ACE_OS::fflush(stdout);
+<BR>&nbsp; peer().send_n("Hello World",sizeof("Hello World"));
+<BR>&nbsp; }
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Mark the service handler as being idle
+now and let the other threads reuse this connection</FONT>
+<BR>&nbsp;this->idle(1);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Wait for the thread to die</FONT>
+<BR>&nbsp;this->thr_mgr()->wait();
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+<BR>};
+<BR>ACE_INET_Addr *addr;
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;addr= new ACE_INET_Addr(PORT_NUM,argv[1]);
+<BR><FONT COLOR="#FF0000">&nbsp;//Creation Strategy</FONT>
+<BR>&nbsp;NULL_CREATION_STRATEGY creation_strategy;
+
+<P><FONT COLOR="#FF0000">&nbsp;//Concurrency Strategy</FONT>
+<BR>&nbsp;&nbsp; NULL_CONCURRENCY_STRATEGY concurrency_strategy;
+
+<P><FONT COLOR="#FF0000">&nbsp;//Connection Strategy</FONT>
+<BR>&nbsp;CACHED_CONNECT_STRATEGY caching_connect_strategy;
+<BR>&nbsp;
+
+<P><FONT COLOR="#FF0000">&nbsp;//instantiate the connector</FONT>
+<BR>&nbsp;STRATEGY_CONNECTOR connector(
+<BR>&nbsp;&nbsp; ACE_Reactor::instance(),<FONT COLOR="#FF0000"> //the reactor
+to use</FONT>
+<BR>&nbsp;&nbsp; &amp;creation_strategy,
+<BR>&nbsp;&nbsp; &amp;caching_connect_strategy,
+<BR>&nbsp;&nbsp; &amp;concurrency_strategy);
+<BR><FONT COLOR="#FF0000">&nbsp;//Use the thread manager to&nbsp; spawn
+a single thread to</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//connect multiple times passing it the
+address</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//of the strategy connector</FONT>
+<BR>&nbsp;if(ACE_Thread_Manager::instance()->spawn(
+<BR>&nbsp;&nbsp;&nbsp; (ACE_THR_FUNC) make_connections,
+<BR>&nbsp;&nbsp;&nbsp; (void *) &amp;connector,
+<BR>&nbsp;&nbsp;&nbsp; THR_NEW_LWP) == -1)
+<BR>&nbsp;ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "client thread spawn
+failed"));
+
+<P>while(1) /* Start the reactor?s event loop */
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+
+<P><FONT COLOR="#FF0000">//Connection establishment function, tries to
+establish connections</FONT>
+<BR><FONT COLOR="#FF0000">//to the same server again and re-uses the connections
+from the</FONT>
+<BR><FONT COLOR="#FF0000">//cache</FONT>
+<BR>void make_connections(void *arg){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"(%t)Prepared to connect \n"));
+<BR>&nbsp;STRATEGY_CONNECTOR *connector= (STRATEGY_CONNECTOR*) arg;
+<BR>&nbsp;for (int i = 0; i &lt; 10; i++){
+<BR>&nbsp;My_Svc_Handler *svc_handler = 0;
+<BR>&nbsp;
+
+<P>&nbsp;<FONT COLOR="#FF0000">// Perform a blocking connect to the server
+using the Strategy</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// Connector with a connection caching
+strategy.&nbsp; Since we are</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// connecting to the same &lt;server_addr>
+these calls will return the</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;// same dynamically allocated &lt;Svc_Handler>
+for each &lt;connect> call.</FONT>
+<BR>&nbsp;if (connector->connect (svc_handler, *addr) == -1){
+<BR>&nbsp; ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "connection failed\n"));
+<BR>&nbsp; return;
+<BR>&nbsp; }
+
+<P><FONT COLOR="#FF0000">&nbsp;// Rest for a few seconds so that the connection
+has been freed up</FONT>
+<BR>&nbsp;ACE_OS::sleep (5);
+<BR>&nbsp;}
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;<A HREF="ex10.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_6/ex10.html b/docs/tutorials/Chap_6/ex10.html
new file mode 100644
index 00000000000..872c1c44a82
--- /dev/null
+++ b/docs/tutorials/Chap_6/ex10.html
@@ -0,0 +1,110 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 10</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Acceptor/Connector"&nbsp;
+(Connection Initialization)</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 10</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Reactor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Svc_Handler.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Synch.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/SOCK_Acceptor.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">PORT_NUM
+10101</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">DATA_SIZE
+12</FONT>
+
+<P><FONT COLOR="#FF0000">//forward declaration</FONT>
+<BR>class My_Svc_Handler;
+
+<P><FONT COLOR="#FF0000">//Create the Acceptor class</FONT>
+<BR>typedef ACE_Acceptor&lt;My_Event_Handler,ACE_SOCK_ACCEPTOR>
+<BR>MyAcceptor;
+
+<P><FONT COLOR="#FF0000">//Create an event handler similar to as seen in
+example 2.</FONT>
+<BR><FONT COLOR="#FF0000">//We have to overload the get_handle() method
+and write the peer()</FONT>
+<BR><FONT COLOR="#FF0000">//method. We also provide the data member peer_
+as the underlying</FONT>
+<BR><FONT COLOR="#FF0000">//stream which is used.</FONT>
+<BR>class My_Event_Handler:
+<BR>&nbsp;public ACE_Event_Handler{
+<BR>private:
+<BR>char* data;
+<BR><FONT COLOR="#FF0000">//Add a new attribute for the underlying stream
+which will be used by the Event Handler</FONT>
+<BR>ACE_SOCK_Stream peer_;
+<BR>public:
+<BR>My_Event_Handler(){
+<BR>&nbsp;data= new char[DATA_SIZE];
+<BR>&nbsp;}
+
+<P>int
+<BR>open(void*){
+<BR>&nbsp;ACE_DEBUG((LM_DEBUG,"Connection established\n"));
+<BR><FONT COLOR="#FF0000">&nbsp;//Register the event handler with the reactor</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->register_handler(this, ACE_Event_Handler::READ_MASK);
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P>int
+<BR>handle_input(ACE_HANDLE){
+<BR>&nbsp;<FONT COLOR="#FF0000">// After using the peer() method of our
+ACE_Event_Handler to obtain a</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//reference to the underlying stream of
+the service handler class we</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//call recv_n() on it to read the data
+which has been received. This</FONT>
+<BR><FONT COLOR="#FF0000">&nbsp;//data is stored in the data array and
+then printed out</FONT>
+<BR>&nbsp;peer().recv_n(data,DATA_SIZE);
+<BR>&nbsp;ACE_OS::printf("&lt;&lt; %s\n",data);
+
+<P>&nbsp;<FONT COLOR="#FF0000">// keep yourself registered with the reactor</FONT>
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">// new method which returns the handle to the
+reactor when it asks for it.</FONT>
+<BR>ACE_HANDLE
+<BR>get_handle(void) const{
+<BR>&nbsp;return this->peer_.get_handle();
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//new method which returns a reference to the
+peer stream</FONT>
+<BR>ACE_SOCK_Stream &amp;
+<BR>peer(void) const{
+<BR>&nbsp;return (ACE_SOCK_Stream &amp;) this->peer_;
+<BR>&nbsp;}
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;ACE_INET_Addr addr(PORT_NUM);
+<BR>&nbsp;<FONT COLOR="#FF0000">//create the acceptor</FONT>
+<BR>&nbsp;MyAcceptor acceptor(addr,<FONT COLOR="#FF0000"> //address to
+accept on</FONT>
+<BR>&nbsp; ACE_Reactor::instance()); <FONT COLOR="#FF0000">//the reactor
+to use</FONT>
+<BR>while(1)<FONT COLOR="#FF0000"> // Start the reactors event loop</FONT>
+<BR>&nbsp;ACE_Reactor::instance()->handle_events();
+<BR>}
+<BR>&nbsp;
+<BR>&nbsp;<A HREF="../Chap_7/ex01.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_7/Chap_7.zip b/docs/tutorials/Chap_7/Chap_7.zip
new file mode 100644
index 00000000000..0073e63d504
--- /dev/null
+++ b/docs/tutorials/Chap_7/Chap_7.zip
Binary files differ
diff --git a/docs/tutorials/Chap_7/ex01.html b/docs/tutorials/Chap_7/ex01.html
new file mode 100644
index 00000000000..59c8a3745d0
--- /dev/null
+++ b/docs/tutorials/Chap_7/ex01.html
@@ -0,0 +1,90 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 1</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Message Queue"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 1</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Message_Queue.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> <FONT COLOR="#006600">"ace/Get_Opt.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_BLOCK
+1</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">NO_MSGS
+10</FONT>
+
+<P>class QTest{
+<BR>public:
+<BR>QTest():no_msgs_(NO_MSGS){
+<BR>&nbsp;<FONT COLOR="#FF0000">//First create a message queue of default
+size.</FONT>
+<BR>&nbsp;if(!(this->mq_=new ACE_Message_Queue&lt;ACE_NULL_SYNCH> ()))
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"Error in message queue initialization \n"));
+<BR>&nbsp;}
+<BR>&nbsp;
+<BR>int start_test(){
+<BR>&nbsp; for(int i=0; i&lt;no_msgs_;i++){
+<BR>&nbsp;<FONT COLOR="#FF0000">//create a new message block of size 1</FONT>
+<BR>&nbsp;ACE_Message_Block *mb= new ACE_Message_Block(SIZE_BLOCK);<FONT COLOR="#FF0000"></FONT>
+
+<P><FONT COLOR="#FF0000">&nbsp;//Insert data into the message block using
+the rd_ptr</FONT>
+<BR>&nbsp;*mb->wr_ptr()=i;
+
+<P><FONT COLOR="#FF0000">&nbsp;//Be careful to advance the wr_ptr</FONT>
+<BR>&nbsp;mb->wr_ptr(1);
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Enqueue the message block onto the message
+queue</FONT>
+<BR>&nbsp;if(this->mq_->enqueue_prio(mb)==-1){
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"\nCould not enqueue on to mq!!\n"));
+<BR>&nbsp; return -1;
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"EQd data: %d\n",*mb->rd_ptr()));
+<BR>&nbsp;&nbsp; } <FONT COLOR="#FF0000">//end for</FONT>
+
+<P><FONT COLOR="#FF0000">//Now dequeue all the messages</FONT>
+<BR>this->dequeue_all();
+<BR>return 0;
+<BR>&nbsp;}
+
+<P>void dequeue_all(){
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"\n\nBeginning DQ \n"));
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"No. of Messages on Q:%d Bytes on Q:%d \n",mq_->message_count(),
+mq_->message_bytes()));
+<BR>&nbsp;ACE_Message_Block *mb;
+
+<P>&nbsp;<FONT COLOR="#FF0000">//dequeue the head of the message queue
+until no more messages are left</FONT>
+<BR>&nbsp;for(int i=0;i&lt;no_msgs_;i++){
+<BR>&nbsp; mq_->dequeue_head(mb);
+<BR>&nbsp; ACE_DEBUG((LM_INFO,"DQd data %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;}
+<BR>private:
+<BR>&nbsp;ACE_Message_Queue&lt;ACE_NULL_SYNCH> *mq_;
+<BR>&nbsp;int no_msgs_;
+<BR>};
+<BR>&nbsp;
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;QTest test;
+<BR>&nbsp;if(test.start_test()&lt;0)
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"Program failure \n"));
+<BR>}
+
+<P>&nbsp;<A HREF="ex02.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_7/ex02.html b/docs/tutorials/Chap_7/ex02.html
new file mode 100644
index 00000000000..3062e546994
--- /dev/null
+++ b/docs/tutorials/Chap_7/ex02.html
@@ -0,0 +1,165 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 2</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Message Queue"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 2</FONT><FONT COLOR="#000099"></FONT>
+
+<P><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Message_Queue.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT><FONT COLOR="#006600"> "ace/Get_Opt.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Malloc_T.h"</FONT>
+<BR><FONT COLOR="#000099">#define</FONT> <FONT COLOR="#663366">SIZE_BLOCK
+1</FONT>
+
+<P>class Args{
+<BR>public:
+<BR>Args(int argc, char*argv[],int&amp; no_msgs, ACE_Message_Queue&lt;ACE_NULL_SYNCH>*
+&amp;mq){
+<BR>&nbsp;ACE_Get_Opt get_opts(argc,argv,"h:l:t:n:xsd");
+<BR>&nbsp;while((opt=get_opts())!=-1)
+<BR>&nbsp; switch(opt){
+<BR>&nbsp; case 'n':
+<BR>&nbsp;&nbsp;<FONT COLOR="#FF0000"> //set the number of messages we
+wish to enqueue and dequeue</FONT>
+<BR>&nbsp;&nbsp; no_msgs=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"Number of Messages %d \n",no_msgs));
+<BR>&nbsp;&nbsp; break;
+
+<P>&nbsp; case 'h':
+<BR>&nbsp;&nbsp; <FONT COLOR="#FF0000">//set the high water mark</FONT>
+<BR>&nbsp;&nbsp; hwm=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; mq->high_water_mark(hwm);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"High Water Mark %d msgs \n",hwm));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'l':
+<BR>&nbsp;&nbsp;<FONT COLOR="#FF0000"> //set the low water mark</FONT>
+<BR>&nbsp;&nbsp; lwm=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; mq->low_water_mark(lwm);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"Low Water Mark %d msgs \n",lwm));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; default:
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_ERROR, "Usage -n&lt;no. messages> -h&lt;hwm>
+-l&lt;lwm>\n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; }
+<BR>&nbsp;}
+
+<P>private:
+<BR>&nbsp;int opt;
+<BR>&nbsp;int hwm;
+<BR>&nbsp;int lwm;
+<BR>};
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P>class QTest{
+<BR>public:
+<BR>QTest(int argc, char*argv[]){
+<BR><FONT COLOR="#FF0000">&nbsp;//First create a message queue of default
+size.</FONT>
+<BR>&nbsp;if(!(this->mq_=new ACE_Message_Queue&lt;ACE_NULL_SYNCH> ()))
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"Error in message queue initialization \n"));
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Use the arguments to set the water marks
+and the no of messages</FONT>
+<BR>&nbsp;args_ = new Args(argc,argv,no_msgs_,mq_);
+<BR>&nbsp;}
+<BR>int start_test(){
+<BR>&nbsp; for(int i=0; i&lt;no_msgs_;i++){
+<BR>&nbsp;<FONT COLOR="#FF0000">//Create a new message block of data buffer
+size 1</FONT>
+<BR>&nbsp;ACE_Message_Block * mb= new ACE_Message_Block(SIZE_BLOCK);
+<BR>&nbsp;
+<BR><FONT COLOR="#FF0000">&nbsp;//Insert data into the message block using
+the rd_ptr</FONT>
+<BR>&nbsp;*mb->wr_ptr()=i;
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Be careful to advance the wr_ptr</FONT>
+<BR>&nbsp;mb->wr_ptr(1);
+
+<P><FONT COLOR="#FF0000">&nbsp;//Enqueue the message block onto the message
+queue</FONT>
+<BR>&nbsp;if(this->mq_->enqueue_prio(mb)==-1){
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"\nCould not enqueue on to mq!!\n"));
+<BR>&nbsp; return -1;
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"EQd data: %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;<FONT COLOR="#FF0000">//Use the iterators to read</FONT>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this->read_all();
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Dequeue all the messages</FONT>
+<BR>&nbsp;this->dequeue_all();
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;
+<BR>&nbsp;}
+
+<P>void read_all(){
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"No. of Messages on Q:%d Bytes on Q:%d \n",
+mq_->message_count(),mq_->message_bytes()));
+<BR>&nbsp;ACE_Message_Block *mb;
+
+<P>&nbsp;<FONT COLOR="#FF0000">//Use the forward iterator</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"\n\nBeginning Forward Read \n"));
+<BR>&nbsp;ACE_Message_Queue_Iterator&lt;ACE_NULL_SYNCH> mq_iter_(*mq_);
+<BR>&nbsp;while(mq_iter_.next(mb)){
+<BR>&nbsp; mq_iter_.advance();
+<BR>&nbsp; ACE_DEBUG((LM_INFO,"Read data %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR>&nbsp;<FONT COLOR="#FF0000">//Use the reverse iterator</FONT>
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"\n\nBeginning Reverse Read \n"));
+<BR>&nbsp;ACE_Message_Queue_Reverse_Iterator&lt;ACE_NULL_SYNCH>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mq_rev_iter_(*mq_);
+<BR>&nbsp;while(mq_rev_iter_.next(mb)){
+<BR>&nbsp; mq_rev_iter_.advance();
+<BR>&nbsp; ACE_DEBUG((LM_INFO,"Read data %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;
+<BR>&nbsp;}
+
+<P>void dequeue_all(){
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"\n\nBeginning DQ \n"));
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"No. of Messages on Q:%d Bytes on Q:%d \n",
+mq_->message_count(),mq_->message_bytes()));
+<BR>&nbsp;ACE_Message_Block *mb;
+
+<P><FONT COLOR="#FF0000">&nbsp;//dequeue the head of the message queue
+until no more messages are left</FONT>
+<BR>&nbsp;for(int i=0;i&lt;no_msgs_;i++){
+<BR>&nbsp; mq_->dequeue_head(mb);
+<BR>&nbsp; ACE_DEBUG((LM_INFO,"DQd data %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;}
+
+<P>private:
+<BR>&nbsp;Args *args_;
+<BR>&nbsp;ACE_Message_Queue&lt;ACE_NULL_SYNCH> *mq_;
+<BR>&nbsp;int no_msgs_;
+<BR>};
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;QTest test(argc,argv);
+<BR>&nbsp;if(test.start_test()&lt;0)
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"Program failure \n"));
+<BR>&nbsp;
+<BR>}
+
+<P>&nbsp;<A HREF="ex03.html">Next Example</A>
+</BODY>
+</HTML>
diff --git a/docs/tutorials/Chap_7/ex03.html b/docs/tutorials/Chap_7/ex03.html
new file mode 100644
index 00000000000..03b6dda63d6
--- /dev/null
+++ b/docs/tutorials/Chap_7/ex03.html
@@ -0,0 +1,158 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Ambreen Ilyas">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+ <TITLE>Example 3</TITLE>
+</HEAD>
+<BODY>
+<FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+<BR><FONT COLOR="#CC0000">//// This example is from the ACE Programmers
+Guide.</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; Chapter:&nbsp; "The Message Queue"</FONT>
+<BR><FONT COLOR="#CC0000">//// For details please see the guide at</FONT>
+<BR><FONT COLOR="#CC0000">//// http://www.cs.wustl.edu/~schmidt/ACE.html</FONT>
+<BR><FONT COLOR="#CC0000">////&nbsp; AUTHOR: Umar Syyid (usyyid@hns.com)</FONT>
+<BR><FONT COLOR="#CC0000">//// and Ambreen Ilyas (ambreen@bitsmart.com)</FONT>
+<BR><FONT COLOR="#CC0000">/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT>
+
+<P><FONT COLOR="#CC0000">//Example 3</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Message_Queue.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/Get_Opt.h"</FONT>
+<BR><FONT COLOR="#000099">#include</FONT> "<FONT COLOR="#006600">ace/OS.h"</FONT>
+
+<P>class Args{
+<BR>public:
+<BR>Args(int argc, char*argv[],int&amp; no_msgs, int&amp; time,ACE_Message_Queue&lt;ACE_NULL_SYNCH>*
+&amp;mq){
+<BR>&nbsp;ACE_Get_Opt get_opts(argc,argv,"h:l:t:n:xsd");
+<BR>&nbsp;while((opt=get_opts())!=-1)
+<BR>&nbsp; switch(opt){
+<BR>&nbsp; case 't':
+<BR>&nbsp;&nbsp; time=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"Time: %d \n",time));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'n':
+<BR>&nbsp;&nbsp; no_msgs=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"Number of Messages %d \n",no_msgs));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'x':
+<BR>&nbsp;&nbsp; mq=ACE_Message_Queue_Factory&lt;ACE_NULL_SYNCH>:: create_laxity_message_queue();
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Creating laxity q\n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'd':
+<BR>&nbsp;&nbsp; mq=ACE_Message_Queue_Factory&lt;ACE_NULL_SYNCH>:: create_deadline_message_queue();
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Creating deadline q\n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 's':
+<BR>&nbsp;&nbsp; mq=ACE_Message_Queue_Factory&lt;ACE_NULL_SYNCH>:: create_static_message_queue();
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_DEBUG,"Creating static q\n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'h':
+<BR>&nbsp;&nbsp; hwm=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; mq->high_water_mark(hwm);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"High Water Mark %d msgs \n",hwm));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; case 'l':
+<BR>&nbsp;&nbsp; lwm=ACE_OS::atoi(get_opts.optarg);
+<BR>&nbsp;&nbsp; mq->low_water_mark(lwm);
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_INFO,"Low Water Mark %d msgs \n",lwm));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; default:
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_ERROR,"Usage specify queue type\n"));
+<BR>&nbsp;&nbsp; break;
+<BR>&nbsp; }
+<BR>&nbsp;}
+
+<P>private:
+<BR>&nbsp;int opt;
+<BR>&nbsp;int hwm;
+<BR>&nbsp;int lwm;
+<BR>};
+<BR>&nbsp;
+<BR>&nbsp;
+
+<P>class QTest{
+<BR>public:
+<BR>QTest(int argc, char*argv[]){
+<BR>&nbsp;args_ = new Args(argc,argv,no_msgs_,time_,mq_);
+<BR>&nbsp;array_ =new ACE_Message_Block*[no_msgs_];
+<BR>&nbsp;}
+
+<P>int start_test(){
+<BR>&nbsp;for(int i=0; i&lt;no_msgs_;i++){
+<BR>&nbsp; ACE_NEW_RETURN (array_[i], ACE_Message_Block (1), -1);
+<BR>&nbsp; set_deadline(i);
+<BR>&nbsp; set_execution_time(i);
+<BR>&nbsp; enqueue(i);
+<BR>&nbsp; }
+
+<P>&nbsp;this->dequeue_all();
+<BR>&nbsp;return 0;
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Call the underlying ACE_Message_Block method
+msg_deadline_time() to set the deadline of the message.</FONT>
+<BR>void set_deadline(int msg_no){
+<BR>&nbsp;float temp=(float) time_/(msg_no+1);
+<BR>&nbsp;ACE_Time_Value tv;
+<BR>&nbsp;tv.set(temp);
+<BR>&nbsp;ACE_Time_Value deadline(ACE_OS::gettimeofday()+tv);
+<BR>&nbsp;array_[msg_no]->msg_deadline_time(deadline);
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"EQd with DLine %d:%d\n", deadline.sec(),deadline.usec()));
+<BR>&nbsp;}
+
+<P><FONT COLOR="#FF0000">//Call the underlying ACE_Message_Block method
+to set the execution time</FONT>
+<BR>void set_execution_time(int msg_no){
+<BR>&nbsp;float temp=(float) time_/10*msg_no;
+<BR>&nbsp;ACE_Time_Value tv;
+<BR>&nbsp;tv.set(temp);
+<BR>&nbsp;ACE_Time_Value xtime(ACE_OS::gettimeofday()+tv);
+<BR>&nbsp;array_[msg_no]->msg_execution_time (xtime);
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"Xtime %d:%d\n",xtime.sec(),xtime.usec()));
+<BR>&nbsp;}
+
+<P>void enqueue(int msg_no){
+<BR><FONT COLOR="#FF0000">&nbsp;//Set the value of data at the read position</FONT>
+<BR>&nbsp;*array_[msg_no]->rd_ptr()=msg_no;
+<BR><FONT COLOR="#FF0000">&nbsp;//Advance write pointer</FONT>
+<BR>&nbsp;array_[msg_no]->wr_ptr(1);
+<BR><FONT COLOR="#FF0000">&nbsp;//Enqueue on the message queue</FONT>
+<BR>&nbsp;if(mq_->enqueue_prio(array_[msg_no])==-1){
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"\nCould not enqueue on to mq!!\n"));
+<BR>&nbsp; return;
+<BR>&nbsp; }
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"Data %d\n",*array_[msg_no]->rd_ptr()));
+<BR>&nbsp;}
+
+<P>void dequeue_all(){
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"Beginning DQ \n"));
+<BR>&nbsp;ACE_DEBUG((LM_INFO,"No. of Messages on Q:%d Bytes on Q:%d \n",
+mq_->message_count(),mq_->message_bytes()));
+<BR>&nbsp;for(int i=0;i&lt;no_msgs_ ;i++){
+<BR>&nbsp; ACE_Message_Block *mb;
+<BR>&nbsp; if(mq_->dequeue_head(mb)==-1){
+<BR>&nbsp;&nbsp; ACE_DEBUG((LM_ERROR,'\nCould not dequeue from mq!!\n"));
+<BR>&nbsp;&nbsp; return;
+<BR>&nbsp;&nbsp; }
+<BR>&nbsp; ACE_DEBUG((LM_INFO,"DQd data %d\n",*mb->rd_ptr()));
+<BR>&nbsp; }
+<BR>&nbsp;}
+<BR>private:
+<BR>&nbsp;Args *args_;
+<BR>&nbsp;ACE_Message_Block **array_;
+<BR>&nbsp;ACE_Message_Queue&lt;ACE_NULL_SYNCH> *mq_;
+<BR>&nbsp;int no_msgs_;
+<BR>&nbsp;int time_;
+<BR>};
+
+<P>int main(int argc, char* argv[]){
+<BR>&nbsp;QTest test(argc,argv);
+<BR>&nbsp;if(test.start_test()&lt;0)
+<BR>&nbsp; ACE_DEBUG((LM_ERROR,"Program failure \n"));
+<BR>&nbsp;
+<BR>}
+<BR>&nbsp;
+</BODY>
+</HTML>
diff --git a/docs/tutorials/guide-tutorials.html b/docs/tutorials/guide-tutorials.html
new file mode 100644
index 00000000000..762e32b5557
--- /dev/null
+++ b/docs/tutorials/guide-tutorials.html
@@ -0,0 +1,48 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) [Netscape]">
+</HEAD>
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#333333" ALINK="#FE0000">
+
+<HR WIDTH="100%"><P>
+<H3>Online Examples from the ACE Programmers Guide</H3>
+
+The following page has links to the example code that is presented in
+the <A HREF="http://www.cs.wustl.edu/~schmidt/ACE-tutorials.ps.gz">ACE
+programmers guide</a>. The guide was created at <A
+HREF="http://www.hns.com">Hughes Network Systems</A>. Questions
+regarding the guide should be sent to <A
+HREF="mailto:usyyid@hns.com">Umar Syyid &lt;usyyid@hns.com></A>
+
+<P>
+<HR WIDTH="100%">
+<H3>Chapter Breakdown</H3>
+
+
+<H4> Chapter 2: <A HREF="Chap_2/ex01.html">IPC&nbsp;_SAP</A></H4>
+
+<H4> Chapter 3: <A HREF="Chap_3/ex01.html">Memory Management</A></H4>
+
+<H4> Chapter 4: <A HREF="Chap_4/ex01.html">Thread Management</A></H4>
+
+<H4> Chapter 5: Tasks and Active&nbsp;Objects</H4>
+
+<H4> Chapter 6: <A HREF="Chap_5/ex01.html">The Reactor</A></H4>
+
+<H4> Chapter 7: <A HREF="Chap_6/ex01.html">The Acceptor and Connector</A></H4>
+
+<H4> Chapter 8: The Service Configurator</H4>
+
+<H4> Chapter 9: <A HREF="Chap_7/ex01.html">Message Queues</A></H4>
+
+<P><HR>
+
+<P>Back to the <A
+HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-tutorials.html">ACE
+tutorials</A> page.
+
+<P>
+<!--#include virtual="/~schmidt/cgi-sig.html" -->
+</BODY>
+</HTML>
diff --git a/docs/tutorials/index.html b/docs/tutorials/online-tutorials.html
index f56cde885a6..f56cde885a6 100644
--- a/docs/tutorials/index.html
+++ b/docs/tutorials/online-tutorials.html