
ngtcp2_conn_initiate_migration
==============================

Synopsis
--------

*#include <ngtcp2/ngtcp2.h>*

.. function:: int ngtcp2_conn_initiate_migration(ngtcp2_conn *conn, const ngtcp2_path *path, ngtcp2_tstamp ts)

    
    `ngtcp2_conn_initiate_migration` starts connection migration to the
    given *path*.  Only client can initiate migration.  Unlike
    `ngtcp2_conn_initiate_immediate_migration`, this function starts a
    path validation with a new path, and migrate to the new path after
    successful path validation.
    
    This function returns 0 if it succeeds, or one of the following
    negative error codes:
    
    :macro:`NGTCP2_ERR_INVALID_STATE`
        Migration is disabled; or handshake is not yet confirmed; or
        client is migrating to server's preferred address.
    :macro:`NGTCP2_ERR_CONN_ID_BLOCKED`
        No unused connection ID is available.
    :macro:`NGTCP2_ERR_INVALID_ARGUMENT`
        :member:`local <ngtcp2_path.local>` field of *path* equals the
        current local address.
    :macro:`NGTCP2_ERR_NOMEM`
        Out of memory
