#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);
This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.8.0. See the documentation for v1.8.0 for the most up-to-date information. |
nng_http_conn_read_req(3http)
NAME
nng_http_conn_read_req - read HTTP request
SYNOPSIS
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.
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.
|
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.
RETURN VALUES
None.
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. |