aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-18 18:49:01 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-18 18:49:01 -0800
commitdd4695f9492b4f30978e9043d7d6925bfe15a715 (patch)
tree84569362574fabe4b984a82e3232e1b75397bb8f /src/supplemental
parentca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968 (diff)
downloadnng-dd4695f9492b4f30978e9043d7d6925bfe15a715.tar.gz
nng-dd4695f9492b4f30978e9043d7d6925bfe15a715.tar.bz2
nng-dd4695f9492b4f30978e9043d7d6925bfe15a715.zip
Merge internal and external URL APIs. No need for
the separation of nni_url and nng_url.
Diffstat (limited to 'src/supplemental')
-rw-r--r--src/supplemental/http/http_api.h6
-rw-r--r--src/supplemental/http/http_client.c2
-rw-r--r--src/supplemental/http/http_msg.c2
-rw-r--r--src/supplemental/http/http_server.c6
-rw-r--r--src/supplemental/websocket/websocket.h4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h
index 813f9fe6..dbda53ae 100644
--- a/src/supplemental/http/http_api.h
+++ b/src/supplemental/http/http_api.h
@@ -108,7 +108,7 @@ 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 int nni_http_req_alloc(nni_http_req **, const nni_url *);
+extern int nni_http_req_alloc(nni_http_req **, const nng_url *);
extern int nni_http_res_alloc(nni_http_res **);
extern int nni_http_res_alloc_error(nni_http_res **, uint16_t);
extern void nni_http_req_free(nni_http_req *);
@@ -170,7 +170,7 @@ extern void nni_http_write_full(nni_http_conn *, nni_aio *);
// a restricted binding is required, we recommend using a URL consisting
// of an empty host name, such as http:// or https:// -- this would
// convert to binding to the default port on all interfaces on the host.
-extern int nni_http_server_init(nni_http_server **, const nni_url *);
+extern int nni_http_server_init(nni_http_server **, const nng_url *);
// nni_http_server_fini drops the reference count on the server, and
// if this was the last reference, closes down the server and frees
@@ -349,7 +349,7 @@ extern const char *nni_http_handler_get_uri(nni_http_handler *);
// Client stuff.
-extern int nni_http_client_init(nni_http_client **, const nni_url *);
+extern int nni_http_client_init(nni_http_client **, const nng_url *);
extern void nni_http_client_fini(nni_http_client *);
// nni_http_client_set_tls sets the TLS configuration. This wipes out
diff --git a/src/supplemental/http/http_client.c b/src/supplemental/http/http_client.c
index 0fbe3ef9..af5bc717 100644
--- a/src/supplemental/http/http_client.c
+++ b/src/supplemental/http/http_client.c
@@ -96,7 +96,7 @@ nni_http_client_fini(nni_http_client *c)
}
int
-nni_http_client_init(nni_http_client **cp, const nni_url *url)
+nni_http_client_init(nni_http_client **cp, const nng_url *url)
{
int rv;
nni_http_client *c;
diff --git a/src/supplemental/http/http_msg.c b/src/supplemental/http/http_msg.c
index a2ab218f..2c258e2c 100644
--- a/src/supplemental/http/http_msg.c
+++ b/src/supplemental/http/http_msg.c
@@ -600,7 +600,7 @@ nni_http_res_get_buf(nni_http_res *res, void **data, size_t *szp)
}
int
-nni_http_req_alloc(nni_http_req **reqp, const nni_url *url)
+nni_http_req_alloc(nni_http_req **reqp, const nng_url *url)
{
nni_http_req *req;
if ((req = NNI_ALLOC_STRUCT(req)) == NULL) {
diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c
index 03b3cf68..0f0d2d80 100644
--- a/src/supplemental/http/http_server.c
+++ b/src/supplemental/http/http_server.c
@@ -1,5 +1,5 @@
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
// Copyright 2018 QXSoftware <lh563566994@126.com>
// Copyright 2019 Devolutions <info@devolutions.net>
@@ -932,7 +932,7 @@ http_server_fini(nni_http_server *s)
}
static int
-http_server_init(nni_http_server **serverp, const nni_url *url)
+http_server_init(nni_http_server **serverp, const nng_url *url)
{
nni_http_server *s;
int rv;
@@ -980,7 +980,7 @@ http_server_init(nni_http_server **serverp, const nni_url *url)
}
int
-nni_http_server_init(nni_http_server **serverp, const nni_url *url)
+nni_http_server_init(nni_http_server **serverp, const nng_url *url)
{
int rv;
nni_http_server *s;
diff --git a/src/supplemental/websocket/websocket.h b/src/supplemental/websocket/websocket.h
index ea4975ff..fab716bf 100644
--- a/src/supplemental/websocket/websocket.h
+++ b/src/supplemental/websocket/websocket.h
@@ -31,7 +31,7 @@ typedef struct nni_ws_dialer nni_ws_dialer;
// Much of the websocket API is still "private", meaning you should not
// rely upon it being around.
-extern int nni_ws_listener_alloc(nng_stream_listener **, const nni_url *);
-extern int nni_ws_dialer_alloc(nng_stream_dialer **, const nni_url *);
+extern int nni_ws_listener_alloc(nng_stream_listener **, const nng_url *);
+extern int nni_ws_dialer_alloc(nng_stream_dialer **, const nng_url *);
#endif // NNG_SUPPLEMENTAL_WEBSOCKET_WEBSOCKET_H