Client Server Diagram: Sending Commands and Responses

The diagram given below shows a simple example of a Client - Server connection and a series of function calls used to send commands and responses.

Client

Action

Server

 

Set the computer to act as a server and listen for connection requests

InetServerInit method

InetConnect method

-------------------------------------------------->
The client requests a connection with the server. This generates an InetAccept event on the server.

InetAccept event

InetConnected event

<--------------------------------------------------
The server accepts the connection request. This generates an InetConnected event on the client.

InetAcceptConnect method

InetSendLoadCmd method

-------------------------------------------------->
The client sends a load command to the server to load a specific image. This generates an InetReceiveCmd event on the server.

InetReceiveCmd event

InetReceiveRsp event

<--------------------------------------------------
The server receives the load command and responds by calling the InetSendLoadRsp method. This generates an InetReceiveRsp event on the client.

InetSendLoadRsp method

InetSendCmd method

-------------------------------------------------->
The client sends a flip command using the InetSendCmd method. This generates another InetReceiveCmd event on the server.

InetReceiveCmd event

InetReceiveRsp event

<--------------------------------------------------
The server calls the InetSendRsp methodin response to receiving the InetSendCmd method call from the client. This generates another InetReceiveRsp event on the client.

InetSendRsp method

InetSendSaveCmd method

-------------------------------------------------->
The client sends a save command using the InetSendSaveCmd method. This generates another InetReceiveCmd event on the server.

InetReceiveCmd event

InetReceiveRsp event

<--------------------------------------------------
The server calls the InetSendSaveRsp method in response to receiving the InetSendSaveCmd method call from the client. This generates another InetReceiveRsp eventon the client.

InetSendSaveRsp method

InetDisconnect method

-------------------------------------------------->
The client has finished sending all the commands and closes the connection to the server. This generates an InetDisconnected event on the server.

InetDisconnected event