lsquic_global.c revision 5392f7a3
1/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */ 2/* 3 * Global state 4 */ 5 6#include "lsquic_int_types.h" 7#include "lsquic_types.h" 8#include "lsquic.h" 9#include "lsquic_str.h" 10#include "lsquic_enc_sess.h" 11#include "lsquic_util.h" 12 13 14int 15lsquic_global_init (int flags) 16{ 17 lsquic_init_timers(); 18 if (0 != lsquic_enc_session_common_gquic_1.esf_global_init(flags)) 19 return -1; 20 if (0 != lsquic_enc_session_common_ietf_v1.esf_global_init(flags)) 21 return -1; 22 return 0; 23} 24 25 26void 27lsquic_global_cleanup (void) 28{ 29 lsquic_enc_session_common_gquic_1.esf_global_cleanup(); 30 lsquic_enc_session_common_ietf_v1.esf_global_cleanup(); 31} 32