
ngtcp2_conn_decode_and_set_0rtt_transport_params
================================================

Synopsis
--------

*#include <ngtcp2/ngtcp2.h>*

.. function:: 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:
    
    - :member:`ngtcp2_transport_params.initial_max_streams_bidi`
    - :member:`ngtcp2_transport_params.initial_max_streams_uni`
    - :member:`ngtcp2_transport_params.initial_max_stream_data_bidi_local`
    - :member:`ngtcp2_transport_params.initial_max_stream_data_bidi_remote`
    - :member:`ngtcp2_transport_params.initial_max_stream_data_uni`
    - :member:`ngtcp2_transport_params.initial_max_data`
    - :member:`ngtcp2_transport_params.active_connection_id_limit`
    - :member:`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:
    
    :macro:`NGTCP2_ERR_NOMEM`
        Out of memory.
    :macro:`NGTCP2_ERR_MALFORMED_TRANSPORT_PARAM`
        The input is malformed.
