The client builds request message and calls tt_message_send.
ttsession finds a handler.
The environment variable
is set by ttsession when it starts the handler.
The handler starts up and calls tt_open and tt_fd to establish communication to ttsession.
The handler declares its ptype to ttsession.
ttsession changes all the static patterns for the ptype into dynamic patterns.
At this point, the patterns are not active because the handler has not yet joined the session.
The handler joins session, activating patterns.
ttsession notifies the handler that a message is queued.
The handler notices activity on the file descriptor and calls tt_message_receive to retrieve the message.
If the message returned by tt_message_receive has
the ToolTalk service started the process to deliver the message. In this case,
messages for the ptype are blocked until the process either replies, rejects,
or fails the message (even if it is a notice), or calls tt_message_accept.
The handler performs the requested operation.
The handler returns a reply to request.
ttsession notifies the client that a (reply) message for it is in the queue.
The client's file descriptor is activated.
The client actually receives a message every time its request message changes state.
The client calls tt_message_receive to retrieve the result.