ngtcp2_conn_encode_early_transport_params

Synopsis

#include <ngtcp2/ngtcp2.h>

ngtcp2_ssize ngtcp2_conn_encode_early_transport_params(ngtcp2_conn *conn, uint8_t *dest, size_t destlen)

ngtcp2_conn_encode_early_transport_params() encodes the QUIC transport parameters that are used for early data in the buffer pointed by dest of length destlen. The subset includes at least the following fields:

  • initial_max_stream_id_bidi

  • initial_max_stream_id_uni

  • initial_max_stream_data_bidi_local

  • initial_max_stream_data_bidi_remote

  • initial_max_stream_data_uni

  • initial_max_data

  • active_connection_id_limit

  • max_datagram_frame_size

If conn is initialized as server, the following additional fields are also included:

  • max_idle_timeout

  • max_udp_payload_size

  • disable_active_migration

If conn is initialized as client, these parameters are synthesized from the remote transport parameters received from server. Otherwise, it is the local transport parameters that are set by the local endpoint.

This function returns the number of bytes written, or one of the following negative error codes:

NGTCP2_ERR_NOBUF

Buffer is too small.