mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
QUIC DDD: ddd-02-conn-nonblocking-threads: Planned changes
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21715)
This commit is contained in:
parent
74d588ca15
commit
1ed2d7929a
@ -32,7 +32,11 @@ SSL_CTX *create_ssl_ctx(void)
|
|||||||
{
|
{
|
||||||
SSL_CTX *ctx;
|
SSL_CTX *ctx;
|
||||||
|
|
||||||
|
#ifdef USE_QUIC
|
||||||
|
ctx = SSL_CTX_new(QUIC_client_thread_method());
|
||||||
|
#else
|
||||||
ctx = SSL_CTX_new(TLS_client_method());
|
ctx = SSL_CTX_new(TLS_client_method());
|
||||||
|
#endif
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -170,7 +174,11 @@ int rx(APP_CONN *conn, void *buf, int buf_len)
|
|||||||
*/
|
*/
|
||||||
int get_conn_fd(APP_CONN *conn)
|
int get_conn_fd(APP_CONN *conn)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_QUIC
|
||||||
|
return BIO_get_poll_fd(conn->ssl_bio, NULL);
|
||||||
|
#else
|
||||||
return BIO_get_fd(conn->ssl_bio, NULL);
|
return BIO_get_fd(conn->ssl_bio, NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -188,7 +196,11 @@ int get_conn_fd(APP_CONN *conn)
|
|||||||
*/
|
*/
|
||||||
int get_conn_pending_tx(APP_CONN *conn)
|
int get_conn_pending_tx(APP_CONN *conn)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_QUIC
|
||||||
|
return POLLIN | POLLOUT | POLLERR;
|
||||||
|
#else
|
||||||
return (conn->tx_need_rx ? POLLIN : 0) | POLLOUT | POLLERR;
|
return (conn->tx_need_rx ? POLLIN : 0) | POLLOUT | POLLERR;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_conn_pending_rx(APP_CONN *conn)
|
int get_conn_pending_rx(APP_CONN *conn)
|
||||||
|
Loading…
Reference in New Issue
Block a user