2012-03-13 16:32:52 +01:00
|
|
|
API Reference
|
|
|
|
=============
|
|
|
|
|
|
|
|
Includes
|
|
|
|
--------
|
|
|
|
|
2013-07-12 17:19:03 +02:00
|
|
|
To use the public APIs, include ``nghttp2/nghttp2.h``::
|
2012-03-13 16:32:52 +01:00
|
|
|
|
2013-07-12 17:19:03 +02:00
|
|
|
#include <nghttp2/nghttp2.h>
|
2012-12-22 17:24:56 +01:00
|
|
|
|
2013-09-04 15:57:02 +02:00
|
|
|
The header files are also available online: :doc:`nghttp2.h` and
|
|
|
|
:doc:`nghttp2ver.h`.
|
|
|
|
|
2012-12-22 17:24:56 +01:00
|
|
|
Remarks
|
|
|
|
-------
|
|
|
|
|
2014-05-10 16:22:06 +02:00
|
|
|
Do not call `nghttp2_session_send()`, `nghttp2_session_mem_send()`,
|
|
|
|
`nghttp2_session_recv()` or `nghttp2_session_mem_recv()` from the
|
|
|
|
nghttp2 callback functions directly or indirectly. It will lead to the
|
|
|
|
crash. You can submit requests or frames in the callbacks then call
|
2014-02-18 15:23:11 +01:00
|
|
|
these functions outside the callbacks.
|
2014-05-10 16:22:06 +02:00
|
|
|
|
|
|
|
Currently, `nghttp2_session_send()` and `nghttp2_session_mem_send()`
|
|
|
|
do not send client connection preface
|
|
|
|
(:macro:`NGHTTP2_CLIENT_CONNECTION_PREFACE`). The applications are
|
|
|
|
responsible to send it before sending any HTTP/2 frames using these
|
|
|
|
functions if :type:`nghttp2_session` is configured as client.
|
|
|
|
Similarly, `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`
|
|
|
|
do not consume client connection preface. The applications are
|
|
|
|
responsible to receive it before calling these functions if
|
|
|
|
:type:`nghttp2_session` is configured as server.
|