by Cristian Francu, June 1997
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:
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
% ./makeall
The server is launched by typing
%java examples.TSTP.Server <port number>
example:
%java examples.TSTP.Server 5000
The server is now ready to accept requests.
After launching the server, the client can be launched by typing
% java examples.TSTP.Client <host name> <port number>