Explain the Communications of Request or Response Interface
The inter-application communication must provide four specific interface to the CSInterface() components. A client must be able to send and receive from the server and the server must be able to receive from the client and return results. The communications interface must provide these generic services to the application layer while remaining transport independent at the bottom layer. Communications interface components may be required to perform more advanced functions than simple send and receive. First, it is their responsibility to mask the underlying protocols from the developer.
Second the communications interface must manage the modes of operation for CSInterface(). Our previous example of CSInterface() used CallServer() to communicate with the server computer. The client uses the CallServer() procedure to send request to the server in either synchronous or asynchronous mode:
- In synchronous mode, client request will be returned upon receipt of results from the server.
- In asynchronous mode, the CallServer() function will need to send the request to the server and immediately return.
Third, with the inclusion of callback procedures, the communications interface component must initiate the callback to the application- level code. Callbacks are most easily managed by including a pointer to the procedure in the REQHEADER for each CSInterface() call as documented in the previous section.
When the server returns the result of executed procedure, the communications interface can scan the REQHEADER for configured callbacks. If they exist, the communications interface should dispatch CSInterfaceSetupCallback() for setup and execution of the callback.