void SetDataTransferTimeout( qUnsignedInt32 timeoutBytesPerSecond, TimeInterval minimumTimeoutMilliSecond = DataStoreConstants::DEFAULT_DATA_TRANSFER_MINIMUM_TIMEOUT );
Name | Description | |
---|---|---|
in | timeoutBytesPerSecond | The minimum communication speed that will serve as the basis of the timeout calculation. (Bytes per second.) No timeout if 0 is specified. |
in | minimumTimeoutMilliSecond | The minimum wait time, regardless of data size being sent/received. (Milliseconds.) |
Sets the timeout value when sending and receiving data.
Data is sent and received by calls to the DataStoreClient::GetObject
function, the DataStoreClient::PostObject
function, and the DataStoreClient::UpdateObject
function. This function sets the timeout value that applies at such times. The timeout value (in milliseconds) is set according to the following calculation:
std::max(dataSizeInBytesBeingTransmitted / timeoutBytesPerSecond * 1000, minimumTimeoutMilliSecond);
If this function is not used (if it has not been set), then the timeout value takes the value calculated from setting DataStoreConstants::DEFAULT_DATA_TRANSFER_TIMEOUT_BYTES_PER_SECOND
for timeoutBytesPerSecond and DataStoreConstants::DEFAULT_DATA_TRANSFER_MINIMUM_TIMEOUT
for minimumTimeoutMilliSecond. To give examples of this default setting, a timeout would occur if transmission of 100 KB of data had not ended even after 10 minutes, and if a 1-byte file had not downloaded even after 60 seconds. The timeout value is determined by the value set by this function and the size, in bytes, of the data being transmitted (dataSizeInBytesBeingTransmitted). (The timeout process does not take place if the communications speed temporarily dips below timeoutBytesPerSecond.) You can switch the timeout value for each session by calling this function every time a function that results in HTTP communication is called. If you want to generate a timeout at a set time for every RMC, use the CallContext::SetTimeout
function.
CONFIDENTIAL