lsquic_global.c revision 5392f7a3
1229fce07SDmitri Tikhonov/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */ 250aadb33SDmitri Tikhonov/* 350aadb33SDmitri Tikhonov * Global state 450aadb33SDmitri Tikhonov */ 550aadb33SDmitri Tikhonov 683287402SDmitri Tikhonov#include "lsquic_int_types.h" 750aadb33SDmitri Tikhonov#include "lsquic_types.h" 850aadb33SDmitri Tikhonov#include "lsquic.h" 983287402SDmitri Tikhonov#include "lsquic_str.h" 105392f7a3SLiteSpeed Tech#include "lsquic_enc_sess.h" 1183287402SDmitri Tikhonov#include "lsquic_util.h" 1250aadb33SDmitri Tikhonov 1350aadb33SDmitri Tikhonov 1450aadb33SDmitri Tikhonovint 1550aadb33SDmitri Tikhonovlsquic_global_init (int flags) 1650aadb33SDmitri Tikhonov{ 1783287402SDmitri Tikhonov lsquic_init_timers(); 185392f7a3SLiteSpeed Tech if (0 != lsquic_enc_session_common_gquic_1.esf_global_init(flags)) 195392f7a3SLiteSpeed Tech return -1; 205392f7a3SLiteSpeed Tech if (0 != lsquic_enc_session_common_ietf_v1.esf_global_init(flags)) 215392f7a3SLiteSpeed Tech return -1; 225392f7a3SLiteSpeed Tech return 0; 2350aadb33SDmitri Tikhonov} 2450aadb33SDmitri Tikhonov 2550aadb33SDmitri Tikhonov 2650aadb33SDmitri Tikhonovvoid 2750aadb33SDmitri Tikhonovlsquic_global_cleanup (void) 2850aadb33SDmitri Tikhonov{ 295392f7a3SLiteSpeed Tech lsquic_enc_session_common_gquic_1.esf_global_cleanup(); 305392f7a3SLiteSpeed Tech lsquic_enc_session_common_ietf_v1.esf_global_cleanup(); 3150aadb33SDmitri Tikhonov} 32