summaryrefslogtreecommitdiff
path: root/docs/tutorials/015/page01.html
blob: 9f12daac318e21e194df0a6c96d211cb950fa7d6 (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
39
40
41
<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%">

In a typical client/server system you will be sending and receiving
      data.  That's the whole point after all.
<P>
In the client/server tutorials that we've done so far it was just a
      matter of sending a buffer of data to the peer.  This was done
      with the send*() and recv*() methods of the ACE_SOCK* objects.
<P>
In a more robust system, one might want to process the data before
      sending it to a peer and "unprocess" it after reading from a
      peer.  These processing steps might include encryption,
      compression, applying checksums or any number of other actions.
<P>
In this tutorial a Protocol_Stream object is created to encrypt and
      compress* data being sent between peers.  Both client and server 
      applications are presented as well.  I present the application
level code first and then go into the details of the protocol stream
and it's helper objects.  If the stream stuff in the application logic 
is confusing then just read on by and come back to it after the later
discussions.

<P>
<font size=-1>* Ok, I didn't really implement encryption and
        compression objects.  I'll leave that as a thought
        exercise!</font>
<P><HR WIDTH="100%">
<CENTER>[<A HREF="..">Tutorial Index</A>] [<A HREF="page02.html">Continue This Tutorial</A>]</CENTER>