dwnx_conn_client_new ==================== Synopsis -------- *#include * .. function:: int dwnx_conn_client_new(dwnx_conn **pconn, const dwnx_callbacks *callbacks, const dwnx_settings *settings, const dwnx_transport_params *params, const dwnx_mem *mem, void *user_data) `dwnx_conn_client_new` creates new :type:`dwnx_conn` as a client. If it succeeds, it assigns the pointer to the object to *\*pconn*. *callbacks*, *settings*, and *params* must not be NULL, and the function makes a copy of each of them. *params* is the local transport parameters, and sent to a remote endpoint during handshake. *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 `dwnx_mem_default()` is used. Call `dwnx_conn_del` to free memory allocated for *\*pconn*. This function returns 0 if it succeeds, or one of the following negative error codes: :macro:`DWNX_ERR_NOMEM` Out of memory.