summaryrefslogtreecommitdiff
path: root/docs/tutorials/015/page16.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/015/page16.html')
-rw-r--r--docs/tutorials/015/page16.html85
1 files changed, 0 insertions, 85 deletions
diff --git a/docs/tutorials/015/page16.html b/docs/tutorials/015/page16.html
deleted file mode 100644
index aa57e8fb2da..00000000000
--- a/docs/tutorials/015/page16.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="Author" CONTENT="James CE Johnson">
- <TITLE>ACE Tutorial 015</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000FFF" VLINK="#FF0F0F">
-
-<CENTER><B><FONT SIZE=+2>ACE Tutorial 015</FONT></B></CENTER>
-
-<CENTER><B><FONT SIZE=+2>Building a protocol stream</FONT></B></CENTER>
-
-<P>
-<HR WIDTH="100%">
-The Recv implementation is nearly as simple as Xmit. There's
-opportunity for error when we get the message size and we have to
-manage the lifetime of the tickler but other than that it's pretty
-basic stuff.
-<HR>
-<PRE>
-
-<font color=red>// $Id$</font>
-
-<font color=blue>#ifndef</font> <font color=purple>RECV_H</font>
-<font color=blue>#define</font> <font color=purple>RECV_h</font>
-
-<font color=blue>#include</font> "<font color=green>Protocol_Task.h</font>"
-
-class ACE_SOCK_Stream;
-
-<font color=red>/* Get some data from the peer and send it upstream for
- de-protocol-ization.
-*/</font>
-class Recv : public Protocol_Task
-{
-public:
-
- typedef Protocol_Task inherited;
-
- <font color=red>// Give it someone to talk to...</font>
- Recv( ACE_SOCK_Stream & _peer );
-
- ~Recv(void);
-
- <font color=red>// Trigger a read from the socket</font>
- int get(void);
-
- <font color=red>// In some cases it might be easier to check the "<font color=green>state</font>" of the</font>
- <font color=red>// Recv object than to rely on return codes filtering back to</font>
- <font color=red>// you.</font>
- int error(void)
- {
- return this->error_;
- }
-
-protected:
-
- ACE_SOCK_Stream & peer(void)
- {
- return this->peer_;
- }
-
- <font color=red>// The baseclass will trigger this when our get() method is</font>
- <font color=red>// called. A message block of the appropriate size is created,</font>
- <font color=red>// filled and passed up the stream.</font>
- int recv(ACE_Message_Block * message,
- ACE_Time_Value *timeout = 0);
-
-private:
- <font color=red>// Our endpoint</font>
- ACE_SOCK_Stream & peer_;
-
- <font color=red>// get() uses a bogus message block to cause the baseclass to</font>
- <font color=red>// invoke recv(). To avoid memory thrashing, we create that</font>
- <font color=red>// bogus message once and reuse it for the life of Recv.</font>
- ACE_Message_Block * tickler_;
-
- <font color=red>// Our error flag (duh)</font>
- int error_;
-};
-
-<font color=blue>#endif</font> <font color=red>// RECV_H</font>
-</PRE>
-<P><HR WIDTH="100%">
-<CENTER>[<A HREF="../online-tutorials.html">Tutorial Index</A>] [<A HREF="page17.html">Continue This Tutorial</A>]</CENTER>