NET_DVR_SetConnectTime

Set network connection timeout and connection attempts.

API Definition

BOOL NET_DVR_SetConnectTime(
  DWORD   dwWaitTime,
  DWORD   dwTryTimes
);

Parameters

dwWaitTime

[IN] Timeout, unit: ms, value range: [300,75000]; the maximum timeout varies with different operating systems.

dwTryTimes

[IN] Connection attempts (reserved).

Return Values

Return TRUE for success, and return FALSE for failure.

If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.

Remarks

  • For Windows operating system, the default connection timeout is 3000 ms; for Linux operating system with version 5.2.7.2 and above, he default connection timeout is 3500 ms.

  • For HCNetSDK with version 4.0 and above, when the configured timeout is larger than or smaller than the limit value, this API will not return FALSE, it will automatically use the timeout that is closest to the limit value as the actual timeout.