ngtcp2_conn_initiate_immediate_migration
Synopsis
#include <ngtcp2/ngtcp2.h>
-
int ngtcp2_conn_initiate_immediate_migration(ngtcp2_conn *conn, const ngtcp2_path *path, ngtcp2_tstamp ts)
ngtcp2_conn_initiate_immediate_migration()starts connection migration to the given path. Only client can initiate migration. This function does immediate migration; while the path validation is nonetheless performed, this function does not wait for it to succeed.This function returns 0 if it succeeds, or one of the following negative error codes:
NGTCP2_ERR_INVALID_STATEMigration is disabled; or handshake is not yet confirmed; or client is migrating to server’s preferred address.
NGTCP2_ERR_CONN_ID_BLOCKEDNo unused connection ID is available.
NGTCP2_ERR_INVALID_ARGUMENTlocalfield of path equals the current local address.NGTCP2_ERR_NOMEMOut of memory