unsigned int remote : 1;
} QUIC_TERMINATE_CAUSE;
-
/*
* Create a new QUIC channel using the given arguments. The argument structure
* does not need to remain allocated. Returns NULL on failure.
int ossl_quic_channel_get_peer_addr(QUIC_CHANNEL *ch, BIO_ADDR *peer_addr);
int ossl_quic_channel_set_peer_addr(QUIC_CHANNEL *ch, const BIO_ADDR *peer_addr);
-/* Gets/sets the underlying network read and write BIOs. */
-BIO *ossl_quic_channel_get_net_rbio(QUIC_CHANNEL *ch);
-BIO *ossl_quic_channel_get_net_wbio(QUIC_CHANNEL *ch);
-int ossl_quic_channel_set_net_rbio(QUIC_CHANNEL *ch, BIO *net_rbio);
-int ossl_quic_channel_set_net_wbio(QUIC_CHANNEL *ch, BIO *net_wbio);
-
/*
* Returns an existing stream by stream ID. Returns NULL if the stream does not
* exist.
* zero or more subsidiary QUIC_CHANNEL instances, each of which represents a
* single QUIC connection. All QUIC_CHANNEL instances must belong to a
* QUIC_PORT.
+ *
+ * A QUIC port is responsible for managing a set of channels which all use the
+ * same UDP socket, and (in future) for automatically creating new channels when
+ * incoming connections are received.
+ *
+ * In order to retain compatibility with QUIC_TSERVER, it also supports a point
+ * of legacy compatibility where a caller can create an incoming (server role)
+ * channel and that channel will be automatically be bound to the next incoming
+ * connection. In the future this will go away once QUIC_TSERVER is removed.
*/
typedef struct quic_port_args_st {
/* All channels in a QUIC event domain share the same (libctx, propq). */
return deadline;
}
-/*
- * QUIC Channel: Network BIO Configuration
- * =======================================
- */
-
-int ossl_quic_channel_set_net_rbio(QUIC_CHANNEL *ch, BIO *net_rbio)
-{
- return ossl_quic_port_set_net_rbio(ch->port, net_rbio);
-}
-
-int ossl_quic_channel_set_net_wbio(QUIC_CHANNEL *ch, BIO *net_wbio)
-{
- return ossl_quic_port_set_net_wbio(ch->port, net_wbio);
-}
-
/*
* QUIC Channel: Lifecycle Events
* ==============================
if (ctx.qc->net_rbio == net_rbio)
return;
- if (!ossl_quic_channel_set_net_rbio(ctx.qc->ch, net_rbio))
+ if (!ossl_quic_port_set_net_rbio(ctx.qc->port, net_rbio))
return;
BIO_free_all(ctx.qc->net_rbio);
if (ctx.qc->net_wbio == net_wbio)
return;
- if (!ossl_quic_channel_set_net_wbio(ctx.qc->ch, net_wbio))
+ if (!ossl_quic_port_set_net_wbio(ctx.qc->port, net_wbio))
return;
BIO_free_all(ctx.qc->net_wbio);
{
assert(qc->ch != NULL);
- if (!ossl_quic_channel_set_net_rbio(qc->ch, qc->net_rbio)
- || !ossl_quic_channel_set_net_wbio(qc->ch, qc->net_wbio)
+ if (!ossl_quic_port_set_net_rbio(qc->port, qc->net_rbio)
+ || !ossl_quic_port_set_net_wbio(qc->port, qc->net_wbio)
|| !ossl_quic_channel_set_peer_addr(qc->ch, &qc->init_peer_addr))
return 0;
if ((srv->ch = ossl_quic_port_create_incoming(srv->port, srv->tls)) == NULL)
goto err;
- if (!ossl_quic_channel_set_net_rbio(srv->ch, srv->args.net_rbio)
- || !ossl_quic_channel_set_net_wbio(srv->ch, srv->args.net_wbio))
+ if (!ossl_quic_port_set_net_rbio(srv->port, srv->args.net_rbio)
+ || !ossl_quic_port_set_net_wbio(srv->port, srv->args.net_wbio))
goto err;
qc = OPENSSL_zalloc(sizeof(*qc));