diff options
Diffstat (limited to 'demos/http3/ossl-nghttp3.h')
-rw-r--r-- | demos/http3/ossl-nghttp3.h | 73 |
1 files changed, 40 insertions, 33 deletions
diff --git a/demos/http3/ossl-nghttp3.h b/demos/http3/ossl-nghttp3.h index 78c5ea9866..7926d866b1 100644 --- a/demos/http3/ossl-nghttp3.h +++ b/demos/http3/ossl-nghttp3.h @@ -22,10 +22,10 @@ */ /* Represents an HTTP/3 connection to a server. */ -typedef struct h3_conn_st H3_CONN; +typedef struct ossl_demo_h3_conn_st OSSL_DEMO_H3_CONN; /* Represents an HTTP/3 request, control or QPACK stream. */ -typedef struct h3_stream_st H3_STREAM; +typedef struct ossl_demo_h3_stream_st OSSL_DEMO_H3_STREAM; /* * Creates a HTTP/3 connection using the given QUIC client connection BIO. The @@ -39,66 +39,73 @@ typedef struct h3_stream_st H3_STREAM; * this QUIC binding are ignored. * * user_data is an application-provided opaque value which can be retrieved - * using H3_CONN_get_user_data. Note that the user data value passed to the - * callback functions specified in callbacks is a pointer to the H3_CONN, not - * user_data. + * using OSSL_DEMO_H3_CONN_get_user_data. Note that the user data value passed + * to the callback functions specified in callbacks is a pointer to the + * OSSL_DEMO_H3_CONN, not user_data. * * Returns NULL on failure. */ -H3_CONN *H3_CONN_new_for_conn(BIO *qconn_bio, - const nghttp3_callbacks *callbacks, - const nghttp3_settings *settings, - void *user_data); +OSSL_DEMO_H3_CONN *OSSL_DEMO_H3_CONN_new_for_conn(BIO *qconn_bio, + const nghttp3_callbacks *callbacks, + const nghttp3_settings *settings, + void *user_data); /* - * Works identically to H3_CONN_new_for_conn except that it manages the creation - * of a QUIC connection SSL object automatically using an address string. addr - * should be a string such as "www.example.com:443". The created underlying QUIC - * connection SSL object is owned by the H3_CONN and can be subsequently - * retrieved using H3_CONN_get0_connection. + * Works identically to OSSL_DEMO_H3_CONN_new_for_conn except that it manages + * the creation of a QUIC connection SSL object automatically using an address + * string. addr should be a string such as "www.example.com:443". The created + * underlying QUIC connection SSL object is owned by the OSSL_DEMO_H3_CONN and + * can be subsequently retrieved using OSSL_DEMO_H3_CONN_get0_connection. * * Returns NULL on failure. ctx must be a SSL_CTX using a QUIC client * SSL_METHOD. */ -H3_CONN *H3_CONN_new_for_addr(SSL_CTX *ctx, const char *addr, - const nghttp3_callbacks *callbacks, - const nghttp3_settings *settings, - void *user_data); +OSSL_DEMO_H3_CONN *OSSL_DEMO_H3_CONN_new_for_addr(SSL_CTX *ctx, + const char *addr, + const nghttp3_callbacks *callbacks, + const nghttp3_settings *settings, + void *user_data); -/* Equivalent to SSL_connect(H3_CONN_get0_connection(conn)). */ -int H3_CONN_connect(H3_CONN *conn); +/* Equivalent to SSL_connect(OSSL_DEMO_H3_CONN_get0_connection(conn)). */ +int OSSL_DEMO_H3_CONN_connect(OSSL_DEMO_H3_CONN *conn); /* - * Free the H3_CONN and any underlying QUIC connection SSL object and associated - * streams. + * Free the OSSL_DEMO_H3_CONN and any underlying QUIC connection SSL object and + * associated streams. */ -void H3_CONN_free(H3_CONN *conn); +void OSSL_DEMO_H3_CONN_free(OSSL_DEMO_H3_CONN *conn); -/* Returns the user data value which was specified in H3_CONN_new_for_conn. */ -void *H3_CONN_get_user_data(const H3_CONN *conn); +/* + * Returns the user data value which was specified in + * OSSL_DEMO_H3_CONN_new_for_conn. + */ +void *OSSL_DEMO_H3_CONN_get_user_data(const OSSL_DEMO_H3_CONN *conn); /* Returns the underlying QUIC connection SSL object. */ -SSL *H3_CONN_get0_connection(const H3_CONN *conn); +SSL *OSSL_DEMO_H3_CONN_get0_connection(const OSSL_DEMO_H3_CONN *conn); /* * Handle any pending events on a given HTTP/3 connection. Returns 0 on error. */ -int H3_CONN_handle_events(H3_CONN *conn); +int OSSL_DEMO_H3_CONN_handle_events(OSSL_DEMO_H3_CONN *conn); /* * Submits a new HTTP/3 request on the given connection. Returns 0 on error. * * This works analogously to nghttp3_conn_submit_request(). The stream user data - * pointer passed to the callbacks is a H3_STREAM object pointer; to retrieve - * the stream user data pointer passed to this function, use - * H3_STREAM_get_user_data. + * pointer passed to the callbacks is a OSSL_DEMO_H3_STREAM object pointer; to + * retrieve the stream user data pointer passed to this function, use + * OSSL_DEMO_H3_STREAM_get_user_data. */ -int H3_CONN_submit_request(H3_CONN *conn, +int OSSL_DEMO_H3_CONN_submit_request(OSSL_DEMO_H3_CONN *conn, const nghttp3_nv *hdr, size_t hdrlen, const nghttp3_data_reader *dr, void *stream_user_data); -/* Returns the user data value which was specified in H3_CONN_submit_request. */ -void *H3_STREAM_get_user_data(const H3_STREAM *stream); +/* + * Returns the user data value which was specified in + * OSSL_DEMO_H3_CONN_submit_request. + */ +void *OSSL_DEMO_H3_STREAM_get_user_data(const OSSL_DEMO_H3_STREAM *stream); #endif |