Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_session_server_new2.rst
1
2 nghttp2_session_server_new2
3 ===========================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_session_server_new2(nghttp2_session **session_ptr, const nghttp2_session_callbacks *callbacks, void *user_data, const nghttp2_option *option)
11
12     
13     Like `nghttp2_session_server_new()`, but with additional options
14     specified in the *option*.
15     
16     The *option* can be ``NULL`` and the call is equivalent to
17     `nghttp2_session_server_new()`.
18     
19     This function does not take ownership *option*.  The application is
20     responsible for freeing *option* if it finishes using the object.
21     
22     The library code does not refer to *option* after this function
23     returns.
24     
25     This function returns 0 if it succeeds, or one of the following
26     negative error codes:
27     
28     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
29         Out of memory.