summaryrefslogtreecommitdiff
path: root/docs/tutorials/Chap_6/ex08.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/Chap_6/ex08.html')
-rw-r--r--docs/tutorials/Chap_6/ex08.html96
1 files changed, 0 insertions, 96 deletions
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>