NNG_HTTP_CONN_READ_REQ(3http)
Okay bestie, this is NNG_HTTP_CONN_READ_REQ(3http) from the NNG Reference Manual β and itβs literally the guide to reading an HTTP request off a connection. πβ¨
π NAME π
nng_http_conn_read_req β read HTTP request
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
void nng_http_conn_read_req(nng_http_conn *conn, nng_http_req *req,
nng_aio *aio);
β¨ DESCRIPTION β¨
The nng_http_conn_read_req() function starts an asynchronous read from the HTTP connection conn, reading an HTTP request into the req, including all of the related headers. Itβs giving βrequest incoming, letβs get itβ energy. π
Note β Any HTTP entity/body data associated with the request is not read automatically. The caller should use nng_http_conn_read_all() to read the entity data, based on the details of the request itself. No cap, that part is on you. π«Ά
This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be obtained via nng_aio_result(). That result will either be zero or an error code. Periodt. β
π¦ RETURN VALUES π¦
None. Thatβs it. Zero return-value drama. π
π ERRORS π
NNG_ECANCELEDβ the operation was canceled.NNG_ECLOSEDβ the connection was closed.NNG_ECONNRESETβ the peer closed the connection.NNG_ENOMEMβ insufficient free memory to perform the operation.NNG_ENOTSUPβ HTTP operations are not supported.NNG_ETIMEDOUTβ timeout waiting for data from the connection.
π SEE ALSO π
nng_aio_alloc(3)nng_aio_result(3)nng_strerror(3)nng_http_client_connect(3http)nng_http_conn_read_all(3http)nng(7)
Cute little sign-off, bestie: the footer carries the date 2026-01-13 and the source/version tag NNG_HTTP_CONN_READ_REQ(3http). Stay async and slay! π
ππ
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms