ngtcp2_crypto_write_retry

Synopsis

#include <ngtcp2/ngtcp2_crypto.h>

ngtcp2_ssize ngtcp2_crypto_write_retry(uint8_t *dest, size_t destlen, uint32_t version, const ngtcp2_cid *dcid, const ngtcp2_cid *scid, const ngtcp2_cid *odcid, const uint8_t *token, size_t tokenlen)

ngtcp2_crypto_write_retry() writes Retry packet to the buffer pointed by dest of length destlen. dcid is the Connection ID which appeared in a packet as a Source Connection ID sent by client. scid is a server chosen Source Connection ID. odcid specifies Original Destination Connection ID which appeared in a packet as a Destination Connection ID sent by client. token specifies Retry Token, and tokenlen specifies its length.

This function wraps around ngtcp2_pkt_write_retry() for easier use.

This function returns 0 if it succeeds, or -1.