void myqtt_conn_sanity_socket_check ( MyQttCtx ctx,
axl_bool  enable 

Allows to disable sanity socket check, by default enabled.

While allocating underlying socket descriptors, at the connection creation using (socket system call) myqtt_conn_new, it could happen that the OS assign a socket descriptor used for standard task like: stdout(0), stdin(1), stderr(2).

This happens when the user app issue a close() call over the previous standard descriptors (0,1,2) causing myqtt to allocate a reserved descriptor with some funny behaviours.

Starting from previous context, any user app call issuing a console print will cause to automatically send to the remote site the message printed, bypassing all myqtt mechanisms.

Obviously, this is an odd situation and it is not desirable. By default, MyQtt Library includes a sanity check to just reject creating a MyQtt Conn with an underlying socket descriptor which could cause applications problems.

You can disable this sanity check using this function.

ctxThe context where the operation will be performed.
enableAccording to the value, the sanity check will be enabled or disabled.