aboutsummaryrefslogtreecommitdiff
path: root/docs/man/nng_http_conn_write_res.3http.adoc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-05 16:46:03 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-06 13:58:07 -0800
commitf42d0c6ef956d119e8762a3ecda37886fa055637 (patch)
tree1744a559dafafdfecd906608888bf0cb9f6c4d10 /docs/man/nng_http_conn_write_res.3http.adoc
parentbce6a79fc55852032e9d653b099a121353aaa238 (diff)
downloadnng-f42d0c6ef956d119e8762a3ecda37886fa055637.tar.gz
nng-f42d0c6ef956d119e8762a3ecda37886fa055637.tar.bz2
nng-f42d0c6ef956d119e8762a3ecda37886fa055637.zip
http: server callback API simplified
This simplified API lets callbacks obtain the response from the connection objection directly, and does not require the aio to carry it as a parameter. Further, the request and response are both stored inline in the connection, reducing allocations. This is at present only for the server; the client will get a similar set of changes.
Diffstat (limited to 'docs/man/nng_http_conn_write_res.3http.adoc')
-rw-r--r--docs/man/nng_http_conn_write_res.3http.adoc7
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/man/nng_http_conn_write_res.3http.adoc b/docs/man/nng_http_conn_write_res.3http.adoc
index 6c998785..e88ad164 100644
--- a/docs/man/nng_http_conn_write_res.3http.adoc
+++ b/docs/man/nng_http_conn_write_res.3http.adoc
@@ -1,6 +1,6 @@
= nng_http_conn_write_res(3http)
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This document is supplied under the terms of the MIT License, a
@@ -20,14 +20,13 @@ nng_http_conn_write_res - write HTTP response
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
-void nng_http_conn_write_res(nng_http_conn *conn, nng_http_res *res,
- nng_aio *aio);
+void nng_http_conn_write_res(nng_http_conn *conn, nng_aio *aio);
----
== DESCRIPTION
The `nng_http_conn_write_res()` function starts an asynchronous write of
-the HTTP response _res_ to the connection _conn_.
+the HTTP response associated with the connection _conn_.
The entire response is sent,
including headers, and if present, the response body data.
(The response body can be set with