DSSX_Synch

DSSX_Synch

dssx

1998 12-06


CLASS

DSSX_Synch - A DSS extended construct implementing a synchronous communication mechanism


SYNOPSIS

This class provides a synchronous communication mechanism using DSS as a transport. The model implemented is analogous to clients asking questions and servers providing answers. The members functions are named accordingly.


There is no direct mapping from clients to servers. Multiple clients and servers may use the same DSSX_Synch. However, a client will get the answer corresponding to the question it sent.


The normal order of operations for a complete synchronized communication is as follows:
1. CLIENT CALLS QuestionSend() thereby sending the data necessary to communicate with the server.
2. SERVER CALLS QuestionReceive() and does whatever processing necessary to generate an answer.
3. SERVER CALLS AnswerSend() to send the answer data back to the client.
4. CLIENT CALLS AnswerReceive() thereby receiving answer data corresponding to the question sent.


DSSX_Synch maintains a state with the following possible values:
DSSX_SYNCH_STATE_READY ready for QuestionSend or QuestionReceive
DSSX_SYNCH_STATE_CLIENT between QuestionSend and AnswerReceive
DSSX_SYNCH_STATE_SERVER between QuestionReceive and AnswerSend


If a process attempts to call a member function inappropriate for the current state the member function will return without completing its operation. The initial state is DSSX_SYNCH_STATE_READY.


It is possible to have more than one answer pending while a server (in other words a server may handle more than one question at a time). If a server calls QuestionReceive more than once before AnswerSend then the answers will be sent in the order the questions were recieved (FIFO). Out of order answers can be sent by making use of GetAnswerID and SetAnswerID.


PARENTS


DSSX_Chunk public


CONSTRUCTOR


CLIENT SIDE MEMBER FUNCTIONS


CLIENT SIDE MEMBER FUNCTIONS


MULTIPLE QUESTION SERVER SUPPORT


OTHER MEMBER FUNCTIONS