The exchange_data (k, v, t) function is used to exchange data between an ITP/Server server and a client.
ITP/Server will send the value v to the client and wait for the client to send a response back.
Identifier k can be used by the client to identify the data.
t is the amount of time that ITP/Server will wait for the client to send its response back. After this time has elapsed without an answer, ITP/Server will close the connection and report an error. The client can handle this error but will not be able to communicate with the server. ITP/Server will not time out if this parameter is set to 0.
The function requires a synchronous connection.
The function will return the response from the client.
If the function causes an error the return value is unspecified.
Note
if this function is used and the client does not respond within the time-out period, the Document Processor handling the job will disconnect from the ITP/Document Processor Manager and reconnect after the job has finished. This disconnect is necessary to resynchronize communication.
Note
the exchange_data function is also used to in combination with the web services interface to allow for communication between the caller and the ITP/Server script. Refer to the description of the SubmitEx function in the ITP/Server manual for more information.