
ngtcp2_conn_initiate_key_update
===============================

Synopsis
--------

*#include <ngtcp2/ngtcp2.h>*

.. function:: int ngtcp2_conn_initiate_key_update(ngtcp2_conn *conn, ngtcp2_tstamp ts)

    
    `ngtcp2_conn_initiate_key_update` initiates the key update.
    
    This function returns 0 if it succeeds, or one of the following
    negative error codes:
    
    :macro:`NGTCP2_ERR_INVALID_STATE`
        The handshake has not been confirmed yet; or the connection is
        in the closing or draining period; or the previous key update
        has not been confirmed yet; or key update is too frequent; or
        new keys are not available yet; or no packet encrypted with the
        current key has been acknowledged since the previous key
        update.
