dpiConn_setCallTimeout

Function dpiConn_setCallTimeout 

Source
pub unsafe extern "C" fn dpiConn_setCallTimeout(
    conn: *mut dpiConn,
    value: u32,
) -> c_int
Expand description

Sets the call timeout (in milliseconds) to be used for round-trips to the database made with this connection. A value of 0 means that no timeouts will take place. The current value can be acquired using the function dpiConn_getCallTimeout().

The call timeout value applies to each database round-trip individually, not to the sum of all round-trips. Time spent processing in ODPI-C before or after the completion of each round-trip is not counted.

After a timeout is triggered, ODPI-C attempts to clean up the internal connection state. The cleanup is allowed to take another value milliseconds.

If the cleanup was successful, an exception DPI-1067 will be raised but the application can continue to use the connection.

For small values of call timeout, the connection cleanup may not complete successfully within the additional call timeout period. In this case an exception ORA-3114 is raised and the connection will no longer be usable. It should be closed.

The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.