Imported Upstream version 1.0.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 currently ignored and should be
18     :macro:`NGHTTP2_FLAG_NONE`.
19     
20     If the *opaque_data* is non ``NULL``, then it should point to the 8
21     bytes array of memory to specify opaque data to send with PING
22     frame.  If the *opaque_data* is ``NULL``, zero-cleared 8 bytes will
23     be sent as opaque data.
24     
25     This function returns 0 if it succeeds, or one of the following
26     negative error codes:
27     
28     :macro:`NGHTTP2_ERR_NOMEM`
29         Out of memory.