Sends a request and waits for the reply.
- Parameters
-
[in] | serviceId | Identifier of the service that handles the request. |
[in] | request | Request data in JSON format. |
[in] | timeoutMs | Timeout interval in milliseconds. |
- Returns
- The return value is the reply data in JSON format.
- Usage
- Open a client connection before calling this method, using opClientConnection(string ip, int port) or open.
- Specify the request using the serviceId and request parameters.
- If a reply is not available within the timeout interval specified by the timeoutMs parameter, the method fails. If the value of the timeoutMs parameter is negative or zero, the default timeout interval of 2500 milliseconds is used.
- Calling this method is equivalent to calling sendRequest, then receiveReply, then deleteRequest.
- See also
- deleteRequest, opClientConnection(string ip, int port), open, receiveReply and sendRequest.