nghttp2_conn_server_new ======================= Synopsis -------- *#include * .. function:: int nghttp2_conn_server_new(nghttp2_conn **pconn, const nghttp2_callbacks *callbacks, const nghttp2_settings *settings, const nghttp2_mem *mem, void *user_data) `nghttp2_conn_server_new` creates new :type:`nghttp2_conn` as a server. If it succeeds, it assigns the pointer to the object to *\*pconn*. *callbacks* and *settings* must not be ``NULL``, and the function makes a copy of each of them. *user_data* is the arbitrary pointer which is passed to the user-defined callback functions. *mem* is a memory allocator. If *mem* is ``NULL``, the memory allocator returned by `nghttp2_mem_default()` is used. Call `nghttp2_conn_del` to free memory allocated for *\*pconn*. This function returns 0 if it succeeds, or one of the following negative error codes: :macro:`NGHTTP2_ERR_NOMEM` Out of memory.