7.2. Structure of messages

Application <-> Demon

From the system point of view messages transmitted between applications will by arrays of bytes. To handle them properly system will have to know their length. Messages sent from application to the demon will consist of three parts:

Message type is required to distiguish between messages sent by ordinary applications and control applications. The later have to be interpreted by server (e.g., to establish new sessions).

This message structure wiil be used as well in communication between applications and local demon as between applets and applet demons.

Demon <-> Central Server

To route the messages properly Central Server will have to know AID of application sending the message. The structure of message between Demon and Central server will be the following:

Message length is used to read appropriate number of bytes from the input stream. Messages sent between applications have AID greater than zero. In this case server does not have to interpret the message contents. The message is simply re-sent to all other session participants and stored in the database.

AID equal to zero indicates a control message. In such case the contents of the message must be interpreted in the server. The actual attributes constituting this message depend on the message type.