TSTP Implementation Example

A protocol example built using ACT

This is a fairly simple example on how to implement a protocol, and how to use ACT at the protocol layer interface. The TSTP example contains two executable classes, a client and a server.

TSTP stands for Trivial String Transfer Protocol. It is a very simple protocol using TCP/IP for exchanging and processing strings. For more details check the IDL description of the messages and the finite state machine of the protocol:

Finite State Machine


Compiling TSTP

DISCIPLE ACT comes with all the classes already compiled. In case you want to rebuild TSTP, follow the instructions on "How to Get It", ACT home page. But just in case you want to recompile only the TSTP example there is a way to do that. Under UNIX systems simply launch "makeall" by typing


Launching the Server

The server is launched by typing

example:

The server is now ready to accept requests.


Launching the client

After launching the server, the client can be launched by typing