// IDL for exercise 6 const short messlen = 60; const short namelen = 10; typedef string mess; typedef string name; typedef long messid; interface chat { // the id of the next message, can be used to know what to poll // we could do without this, but it is a good example readonly attribute messid nextmessage; // operation for joining a chat // returns success, and the number of next (not yet posted) message boolean join(in name username, out messid firstmessage); // operation to poll new messages // return success, message(mesageid) // strings are empty ("") in case of failed poll boolean pollmessage(in messid messageid, out name username, out mess message); // operation to post a new message // returns the id of the message messid postmessage(in name username, in mess message); // diconnection // we could have done without this as the server does not // keep any information about clients void disconnect(in name username); };