NNG_HTTP_CONN_READ_REQ(3http)

πŸ“¦ version 1.11, in alpine 3.24

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 πŸ‘‘


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