ngtcp2_conn_handle_expiry

Synopsis

#include <ngtcp2/ngtcp2.h>

int ngtcp2_conn_handle_expiry(ngtcp2_conn *conn, ngtcp2_tstamp ts)

ngtcp2_conn_handle_expiry() handles expired timer.

If it returns NGTCP2_ERR_IDLE_CLOSE, it means that an idle timer has fired for this particular connection. In this case, drop the connection without calling ngtcp2_conn_write_connection_close(). If it returns any of the other negative error codes, close the connection by sending the terminal packet produced by ngtcp2_conn_write_connection_close(). Otherwise, schedule ngtcp2_conn_writev_stream() call. An application may call any number of additional ngtcp2_conn_read_pkt() and ngtcp2_conn_handle_expiry() before calling ngtcp2_conn_writev_stream(). After calling ngtcp2_conn_writev_stream(), new expiry is set. The application should call ngtcp2_conn_get_expiry() to get a new deadline and set the timer.