blob: d74e678e8ccbba8b93fdc52e72c2ca7da9d8e95d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Bob McWhirter">
<TITLE>ACE Tutorial 014</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000FFF" VLINK="#FF0F0F">
<CENTER><B><FONT SIZE=+2>ACE Tutorial 014</FONT></B></CENTER>
<CENTER><B><FONT SIZE=+2>ACE_Stream Tutorial, Of Sorts</FONT></B></CENTER>
<P>
<HR WIDTH="100%">
<p><b>ACE_Stream</b> is handy when you have several <b>ACE_Task</b> objects
that you would like to link together.
<p>An intermediate class you we will deal with is the <b>ACE_Module</b>.
<p>The basic plan is to wrap your <b>Task</b> into a <b>Module</b>, push
the <b>Module</b> onto the <b>Stream</b>. Do this for each <b>Task</b>,
and then inject <b>Message_Block</b>s into the <b>Stream</b>.
<p>Each <b>Task</b> then processes the <b>Message_Block</b>, and forwards
it on to the next <b>Task</b> in the <b>Stream</b>.
<p>If you are not already familiar with <b>Message_Block</b>s and <b>Message_Queue</b>s,
I highly suggest that you check out <A HREF="../#MQ">Tutorials 10-13</A>.
<p>Streams can be used for both downstream and upstream movement of messages. Used
this way mirrors closely the way System V STREAMS work. But you don't have to use them
bidirectionally. In this tutorial, we only use one direction of the Stream. Down.
<p>This tutorial is contributed by Bob McWhirter (bob@netwrench.com)
<P>
<P><HR WIDTH="100%">
<CENTER>[<A HREF="../online-tutorials.html">Tutorial Index</A>] [<A HREF="page02.html">Continue This Tutorial</A>]</CENTER>
|