ngtcp2_conn_decode_and_set_0rtt_transport_params
Synopsis
#include <ngtcp2/ngtcp2.h>
-
int ngtcp2_conn_decode_and_set_0rtt_transport_params(ngtcp2_conn *conn, const uint8_t *data, size_t datalen)
ngtcp2_conn_decode_and_set_0rtt_transport_params()
decodes QUIC transport parameters from data of length datalen, which is assumed to be the parameters received from the server in the previous connection, and sets it to conn. These parameters are used to send 0-RTT data. QUIC requires that client application should remember transport parameters along with a session ticket.At least following fields should be included:
ngtcp2_transport_params.max_datagram_frame_size
(if DATAGRAM extension was negotiated)
This function must only be used by client.
This function returns 0 if it succeeds, or one of the following negative error codes:
NGTCP2_ERR_NOMEM
Out of memory.
NGTCP2_ERR_MALFORMED_TRANSPORT_PARAM
The input is malformed.