#include "internal/quic_tserver.h"
#include "internal/quic_channel.h"
#include "internal/quic_statm.h"
+#include "internal/quic_port.h"
#include "internal/common.h"
#include "internal/time.h"
#include "quic_local.h"
SSL *ssl;
/*
- * The QUIC channel providing the core QUIC connection implementation.
+ * The QUIC port and channel providing the core QUIC connection
+ * implementation.
*/
+ QUIC_PORT *port;
QUIC_CHANNEL *ch;
/* The mutex we give to the QUIC channel. */
const char *certfile, const char *keyfile)
{
QUIC_TSERVER *srv = NULL;
+ QUIC_PORT_ARGS port_args = {0};
QUIC_CHANNEL_ARGS ch_args = {0};
QUIC_CONNECTION *qc = NULL;
if (srv->tls == NULL)
goto err;
+ port_args.libctx = srv->args.libctx;
+ port_args.propq = srv->args.propq;
+ port_args.mutex = srv->mutex;
+ port_args.now_cb = srv->args.now_cb;
+ port_args.now_cb_arg = srv->args.now_cb_arg;
+
+ if ((srv->port = ossl_quic_port_new(&port_args)) == NULL)
+ goto err;
+
+ ch_args.port = srv->port;
ch_args.libctx = srv->args.libctx;
ch_args.propq = srv->args.propq;
ch_args.tls = srv->tls;
SSL_CTX_free(srv->ctx);
SSL_free(srv->tls);
ossl_quic_channel_free(srv->ch);
+ ossl_quic_port_free(srv->port);
#if defined(OPENSSL_THREADS)
ossl_crypto_mutex_free(&srv->mutex);
#endif
return;
ossl_quic_channel_free(srv->ch);
+ ossl_quic_port_free(srv->port);
BIO_free_all(srv->args.net_rbio);
BIO_free_all(srv->args.net_wbio);
OPENSSL_free(srv->ssl);