update_event_loop_info.c (506B)
1 enum MHD_Bool 2 (*update_event_loop_info)(void *cls, 3 struct MHD_TLS_ConnectionState *cs, 4 enum MHD_RequestEventLoopInfo *eli); 5 6 7 switch (connection->tls_state) 8 { 9 case MHD_TLS_CONN_INIT: 10 *eli = MHD_EVENT_LOOP_INFO_READ; 11 return true; 12 case MHD_TLS_CONN_HANDSHAKING: 13 if (0 == gnutls_record_get_direction (connection->tls_session)) 14 *eli = MHD_EVENT_LOOP_INFO_READ; 15 else 16 *eli = MHD_EVENT_LOOP_INFO_WRITE; 17 return true; 18 default: 19 return false; 20 }