/* Advances the state machine. */
int ossl_quic_tserver_tick(QUIC_TSERVER *srv);
+/* Returns 1 if we have a (non-terminated) client. */
+int ossl_quic_tserver_is_connected(QUIC_TSERVER *srv);
+
/*
* Returns 1 if we have finished the TLS handshake
*/
/* Returns 1 if the server is in a terminated state */
int ossl_quic_tserver_is_terminated(const QUIC_TSERVER *srv);
+
/*
* Attempts to read from stream 0. Writes the number of bytes read to
* *bytes_read and returns 1 on success. If no bytes are available, 0 is written
quic_lock(qc); /* best effort */
- if (qc->is_thread_assisted && qc->started)
+ if (qc->is_thread_assisted && qc->started) {
ossl_quic_thread_assist_wait_stopped(&qc->thread_assist);
+ ossl_quic_thread_assist_cleanup(&qc->thread_assist);
+ }
ossl_quic_channel_free(qc->ch);
if (!ossl_assert(qta->joined))
return 0;
- ossl_crypto_condvar_free(qta->cv);
+ ossl_crypto_condvar_free(&qta->cv);
ossl_crypto_thread_native_clean(qta->t);
qta->ch = NULL;
- qta->cv = NULL;
qta->t = NULL;
return 1;
}
return 1;
}
+int ossl_quic_tserver_is_connected(QUIC_TSERVER *srv)
+{
+ return ossl_quic_channel_is_active(srv->ch);
+}
+
/* Returns 1 if the server is in any terminating or terminated state */
int ossl_quic_tserver_is_term_any(const QUIC_TSERVER *srv)
{