Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_submit_ping.rst
1
2 nghttp2_submit_ping
3 ===================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_submit_ping(nghttp2_session *session, uint8_t flags, const uint8_t *opaque_data)
11
12     
13     Submits PING frame.  You don't have to send PING back when you
14     received PING frame.  The library automatically submits PING frame
15     in this case.
16     
17     The *flags* is bitwise OR of 0 or more of the following value.
18     
19     * :macro:`nghttp2_flag.NGHTTP2_FLAG_ACK`
20     
21     Unless `nghttp2_option_set_no_auto_ping_ack()` is used, the *flags*
22     should be :macro:`nghttp2_flag.NGHTTP2_FLAG_NONE`.
23     
24     If the *opaque_data* is non ``NULL``, then it should point to the 8
25     bytes array of memory to specify opaque data to send with PING
26     frame.  If the *opaque_data* is ``NULL``, zero-cleared 8 bytes will
27     be sent as opaque data.
28     
29     This function returns 0 if it succeeds, or one of the following
30     negative error codes:
31     
32     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
33         Out of memory.