Receives a reply to an asynchronous request.
- Parameters
-
[in] | connection | Handle representing a client connection. |
[in] | requestId | Unique identifier for a request. |
[in] | timeoutMs | Timeout interval in milliseconds. |
[out] | reply | Reply data in JSON format. |
[out] | errorMsg | Error message describing the failure, set if the function fails. |
- Returns
- If the function succeeds, the return value is non-zero and reply is set to the reply data in JSON format.
If the function fails, the return value is zero and errorMsg is set to an error message describing the failure.
- Usage
- Specify a client connection handle that was returned by a call to opClientConnectionOpen using the connection parameter. Specify a unique identifier for a request that was returned by a call to opClientConnectionSendRequest using the requestId parameter.
- If a reply is not available within the timeout interval specified by the timeoutMs parameter, the functions fails. If the value of the timeoutMs parameter is negative or zero, the default timeout interval of 2500 milliseconds is used.
- See also
- opClientConnectionOpen and opClientConnectionSendRequest.