summaryrefslogtreecommitdiff
path: root/docs/tutorials/Chap_6
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/Chap_6')
-rw-r--r--docs/tutorials/Chap_6/Chap_6.zipbin14305 -> 0 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
11 files changed, 0 insertions, 1122 deletions
diff --git a/docs/tutorials/Chap_6/Chap_6.zip b/docs/tutorials/Chap_6/Chap_6.zip
deleted file mode 100644
index fcfd5455cba..00000000000
--- a/docs/tutorials/Chap_6/Chap_6.zip
+++ /dev/null
Binary files differ
diff --git a/docs/tutorials/Chap_6/ex01.html b/docs/tutorials/Chap_6/ex01.html
deleted file mode 100644
index ff60ea6dcb7..00000000000
--- a/docs/tutorials/Chap_6/ex01.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<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
deleted file mode 100644
index a5ab4cca339..00000000000
--- a/docs/tutorials/Chap_6/ex02.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<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
deleted file mode 100644
index a68bd303b61..00000000000
--- a/docs/tutorials/Chap_6/ex03.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<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
deleted file mode 100644
index f5910341621..00000000000
--- a/docs/tutorials/Chap_6/ex04.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<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
deleted file mode 100644
index c983e5751f9..00000000000
--- a/docs/tutorials/Chap_6/ex05.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<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
deleted file mode 100644
index 7bfc3b91beb..00000000000
--- a/docs/tutorials/Chap_6/ex06.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<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
deleted file mode 100644
index 7ecf0e57bb3..00000000000
--- a/docs/tutorials/Chap_6/ex07.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<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
deleted file mode 100644
index d90c00fbd67..00000000000
--- a/docs/tutorials/Chap_6/ex08.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<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
deleted file mode 100644
index e641da20bc5..00000000000
--- a/docs/tutorials/Chap_6/ex09.html
+++ /dev/null
@@ -1,211 +0,0 @@
-<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
deleted file mode 100644
index 872c1c44a82..00000000000
--- a/docs/tutorials/Chap_6/ex10.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<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>