nopoll_bool nopoll_conn_is_ready ( noPollConn conn)

Allows to check if the connection is ready to be used (handshake completed).

Note this function may block the caller in the case the hanshake is not completed.

Parameters
connThe connection to be checked.
Returns
nopoll_true in the case the handshake was completed otherwise nopoll_false is returned. The function also returns nopoll_false in case nopoll_conn_is_ok is failing.

References nopoll_conn_complete_handshake(), nopoll_false, nopoll_mutex_lock(), and nopoll_mutex_unlock().

Referenced by nopoll_conn_wait_until_connection_ready().