Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_submit_origin.rst
1
2 nghttp2_submit_origin
3 =====================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_submit_origin(nghttp2_session *session, uint8_t flags, const nghttp2_origin_entry *ov, size_t nov)
11
12     
13     Submits ORIGIN frame.
14     
15     ORIGIN frame is a non-critical extension to HTTP/2 and defined by
16     `RFC 8336 <https://tools.ietf.org/html/rfc8336>`_.
17     
18     The *flags* is currently ignored and should be
19     :macro:`nghttp2_flag.NGHTTP2_FLAG_NONE`.
20     
21     The *ov* points to the array of origins.  The *nov* specifies the
22     number of origins included in *ov*.  This function creates copies
23     of all elements in *ov*.
24     
25     The ORIGIN frame is only usable by a server.  If this function is
26     invoked with client side session, this function returns
27     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`.
28     
29     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
30         Out of memory
31     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`
32         The function is called from client side session.
33     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
34         There are too many origins, or an origin is too large to fit
35         into a default frame payload.