Sending Commands and Responses
LEADTOOLS provides a number of functions that allow you to send commands and responses between a local and a remote computer. This provides a means of using a "super computer" to store and process large numbers of images, while using a smaller, remote computer to send commands indicating which process to perform and which image to use.
In order to receive commands, a class must be derived from LInet and the CommandCallBack member function overridden, on the computer that will be receiving commands. The supported command functions include the following:
When a computer receives a command, the CommandCallBack function is called. The computer that receives the command should then send a response to the computer that sent the command. The supported response functions include the following:
To receive responses, the computer that sent the original command must derive a class from LInet and override the ResponseCallback member function.
While the LInet::SendLoadCmd, LInet::SendLoadRsp, LInet::SendSaveCmd, LInet::SendSaveRsp, etc. provide standard image processing commands and responses, the LInet::SendCmd and LInet::SendRspfunctions provide a means of creating user-defined commands and responses. These commands and responses may require sending extra data, in the form of a packet, along with the command or the response. LEADTOOLS provides functions in the LInetPacket class for creating packets and adding or setting extra data and parameter data. These functions are LInetPacket::LInetPacket, LInetPacket::~LInetPacket, LInetPacket::SetExtraData and LInetPacket::SetFormats. For a diagram of a client server set-up for sending commands and responses, refer to A Client-Server Diagram: Sending Commands and Responses.