aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http/http_api.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-05 08:25:50 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-05 08:38:19 -0700
commitd1bd64c8251171ac8e1d4e71ab8726c2a64fd55a (patch)
tree579cc387639a9be8e0b162aeaa0cd55d9c87f725 /src/supplemental/http/http_api.h
parent883e0289cdab5a81312b0593b098f70114b61f88 (diff)
downloadnng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.tar.gz
nng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.tar.bz2
nng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.zip
Various header file fixes... also fix compilation errors when HTTP is disabled.v2.0.0-alpha.6
Also, some instances nni_aio are changed to nng_aio. We think we want to harmonize some of these types going forward as it will reduce the need to include headers hopefully letting us get away with just "defs.h" in more places.
Diffstat (limited to 'src/supplemental/http/http_api.h')
-rw-r--r--src/supplemental/http/http_api.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h
index 61c6e45f..a8f648dc 100644
--- a/src/supplemental/http/http_api.h
+++ b/src/supplemental/http/http_api.h
@@ -12,10 +12,9 @@
#ifndef NNG_SUPPLEMENTAL_HTTP_HTTP_API_H
#define NNG_SUPPLEMENTAL_HTTP_HTTP_API_H
-#include "core/nng_impl.h"
-#include "nng/http.h"
-
+#include "../../core/defs.h"
#include "http_msg.h"
+#include "nng/http.h"
// This represents the "internal" HTTP API. It should not be used
// or exposed to applications directly.
@@ -68,7 +67,7 @@ extern nng_err nni_http_chunks_parse(
nni_http_chunks *, void *, size_t, size_t *);
extern void nni_http_read_chunks(
- nni_http_conn *, nni_http_chunks *, nni_aio *);
+ nni_http_conn *, nni_http_chunks *, nng_aio *);
extern nni_http_req *nni_http_conn_req(nni_http_conn *);
extern nni_http_res *nni_http_conn_res(nni_http_conn *);
@@ -106,21 +105,21 @@ extern int nni_http_conn_getopt(
// Note that the iovs of the aio's are clobbered by these methods -- callers
// must not use them for any other purpose.
-extern void nni_http_write_req(nni_http_conn *, nni_aio *);
-extern void nni_http_read_res(nni_http_conn *, nni_aio *);
-extern void nni_http_read_req(nni_http_conn *, nni_aio *);
-extern void nni_http_write_res(nni_http_conn *, nni_aio *);
-extern void nni_http_read_discard(nni_http_conn *, size_t, nni_aio *);
+extern void nni_http_write_req(nni_http_conn *, nng_aio *);
+extern void nni_http_read_res(nni_http_conn *, nng_aio *);
+extern void nni_http_read_req(nni_http_conn *, nng_aio *);
+extern void nni_http_write_res(nni_http_conn *, nng_aio *);
+extern void nni_http_read_discard(nni_http_conn *, size_t, nng_aio *);
extern nng_err nni_http_req_alloc_data(nni_http_req *, size_t);
extern nng_err nni_http_res_alloc_data(nni_http_res *, size_t);
extern bool nni_http_is_error(nng_http *);
-extern void nni_http_read(nni_http_conn *, nni_aio *);
-extern void nni_http_read_full(nni_http_conn *, nni_aio *);
-extern void nni_http_write(nni_http_conn *, nni_aio *);
-extern void nni_http_write_full(nni_http_conn *, nni_aio *);
+extern void nni_http_read(nni_http_conn *, nng_aio *);
+extern void nni_http_read_full(nni_http_conn *, nng_aio *);
+extern void nni_http_write(nni_http_conn *, nng_aio *);
+extern void nni_http_write_full(nni_http_conn *, nng_aio *);
extern nng_err nni_http_add_header(nng_http *, const char *, const char *);
extern nng_err nni_http_set_header(nng_http *, const char *, const char *);
@@ -324,7 +323,7 @@ extern int nni_http_client_set(
extern int nni_http_client_get(
nni_http_client *, const char *, void *, size_t *, nni_type);
-extern void nni_http_client_connect(nni_http_client *, nni_aio *);
+extern void nni_http_client_connect(nni_http_client *, nng_aio *);
// nni_http_transact_conn is used to perform a round-trip exchange (i.e. a
// single HTTP transaction). It will not automatically close the connection,
@@ -333,14 +332,14 @@ extern void nni_http_client_connect(nni_http_client *, nni_aio *);
// Note that this will fail with NNG_ENOTSUP if the server attempts to reply
// with a chunked transfer encoding. The request and response used are the
// ones associated with the connection.
-extern void nni_http_transact_conn(nni_http_conn *, nni_aio *);
+extern void nni_http_transact_conn(nni_http_conn *, nng_aio *);
// nni_http_transact is used to execute a single transaction to a server.
// The connection is opened, and will be closed when the transaction is
// complete. Note that this will fail with NNG_ENOTSUP if the server attempts
// to reply with a chunked transfer encoding.
extern void nni_http_transact(
- nni_http_client *, nni_http_req *, nni_http_res *, nni_aio *);
+ nni_http_client *, nni_http_req *, nni_http_res *, nng_aio *);
// nni_http_stream_scheme returns the underlying stream scheme for a given
// upper layer scheme.