ACE Tutorial 015
Building a protocol stream

Well, this has certainly been one of the more verbose tutorials to date. I must say "thanks" to everyone who stuck it out this far!

A quick review of what we've done:

- Create a simple client application and Client object that uses a Protocol Stream without really knowing how they work. The app (and object) rely on the public interface of the Protocol Stream to get the job done. At this level the protocol details are irrelevant.

- Next, we create a simple server application and Server object similar to the client. The Protocol Stream is of course used and we have to know a little more so that we can insert a reader that will ultimately process the data from the client.

- We then go into the details of the Protocol_Stream implementation and it's Protocol_Task object that forms the basis for the stream tasks. Each object is kept as small and simple as possible to improve reusability and future maintenance.

- Finally, the individual protocol objects are discused. Separate objects for the peer interface were created as well as the bogus compressor and encryptor. The protocol can be extended or modified by creating new such objects and installing them in the Protocol_Stream's open() method.

It doesn't sound like much but it certainly took a bunch of files to get there. It's easy to get lost in the details when there's so much to cover so you're encouraged to go over things a couple of times. As always, enhancments of the tutorials is welcome!

Here's the complete file list:

- Makefile

- client Makefile
- client.cpp
- Client_i.h
- Client_i.cpp

- Server Makefile
- server.cpp
- Server_i.h
- Server_i.cpp
- Handler.h
- Handler.cpp

- Protocol_Stream.cpp
- Protocol_Stream.h
- Protocol_Task.cpp
- Protocol_Task.h

- Xmit.cpp
- Xmit.h
- Recv.cpp
- Recv.h

- Compressor.cpp
- Compressor.h
- Crypt.cpp
- Crypt.h

[Tutorial Index]