nghttp2_conn_client_new
Synopsis
#include <nghttp2v2/nghttp2.h>
-
int nghttp2_conn_client_new(nghttp2_conn **pconn, const nghttp2_callbacks *callbacks, const nghttp2_settings *settings, const nghttp2_mem *mem, void *user_data)
nghttp2_conn_client_new()creates newnghttp2_connas a client. If it succeeds, it assigns the pointer to the object to *pconn. callbacks and settings must not beNULL, 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 isNULL, the memory allocator returned bynghttp2_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:
NGHTTP2_ERR_NOMEMOut of memory.