void myqtt_conn_connect_timeout ( MyQttCtx ctx,
long  microseconds_to_wait 
)

Allows to configure myqtt connect timeout.

This function allows to set the TCP connect timeout used by myqtt_conn_new and myqtt_conn_new6

If you call to create a new connection with myqtt_conn_new and connect does not succeed within the period myqtt_conn_new will return with a non-connected myqtt connection.

Value configured on this function, will be returned by myqtt_conn_get_connect_timeout. By default, no timeout is configured.

See also myqtt_conn_timeout which implements the general timeout used by myqtt engine for I/O operations.

Parameters
ctxThe context where the operation will be performed.
microseconds_to_waitTimeout value to be used. The value provided is measured in microseconds (1 seg = 1000000 us). Use 0 to restore the connect timeout to the default value.

References myqtt_support_setenv(), and myqtt_support_unsetenv().