libwebsockets
Lightweight C library for HTML5 websockets
lws_client_connect_info Struct Reference

#include <libwebsockets.h>

Data Fields

struct lws_context * context
 
const char * address
 
int port
 
int ssl_connection
 
const char * path
 
const char * host
 
const char * origin
 
const char * protocol
 
int ietf_version_or_minus_one
 
void * userdata
 
const struct lws_extensionclient_exts
 
const char * method
 
struct lws * parent_wsi
 
const char * uri_replace_from
 
const char * uri_replace_to
 
struct lws_vhost * vhost
 
struct lws ** pwsi
 
void * _unused [4]
 

Detailed Description

struct lws_client_connect_info - parameters to connect with when using lws_client_connect_via_info()

Field Documentation

◆ _unused

void* lws_client_connect_info::_unused[4]

dummy

◆ address

const char* lws_client_connect_info::address

remote address to connect to

◆ client_exts

const struct lws_extension* lws_client_connect_info::client_exts

array of extensions that may be used on connection

◆ context

struct lws_context* lws_client_connect_info::context

lws context to create connection in

◆ host

const char* lws_client_connect_info::host

content of host header

◆ ietf_version_or_minus_one

int lws_client_connect_info::ietf_version_or_minus_one

deprecated: currently leave at 0 or -1

◆ method

const char* lws_client_connect_info::method

if non-NULL, do this http method instead of ws[s] upgrade. use "GET" to be a simple http client connection

◆ origin

const char* lws_client_connect_info::origin

content of origin header

◆ parent_wsi

struct lws* lws_client_connect_info::parent_wsi

if another wsi is responsible for this connection, give it here. this is used to make sure if the parent closes so do any child connections first.

◆ path

const char* lws_client_connect_info::path

uri path

◆ port

int lws_client_connect_info::port

remote port to connect to

◆ protocol

const char* lws_client_connect_info::protocol

list of ws protocols we could accept

◆ pwsi

struct lws** lws_client_connect_info::pwsi

if not NULL, store the new wsi here early in the connection process. Although we return the new wsi, the call to create the client connection does progress the connection somewhat and may meet an error that will result in the connection being scrubbed and NULL returned. While the wsi exists though, he may process a callback like CLIENT_CONNECTION_ERROR with his wsi: this gives the user callback a way to identify which wsi it is that faced the error even before the new wsi is returned and even if ultimately no wsi is returned.

◆ ssl_connection

int lws_client_connect_info::ssl_connection

nonzero for ssl

◆ uri_replace_from

const char* lws_client_connect_info::uri_replace_from

if non-NULL, when this string is found in URIs in text/html content-encoding, it's replaced with uri_replace_to

◆ uri_replace_to

const char* lws_client_connect_info::uri_replace_to

see uri_replace_from

◆ userdata

void* lws_client_connect_info::userdata

if non-NULL, use this as wsi user_data instead of malloc it

◆ vhost

struct lws_vhost* lws_client_connect_info::vhost

vhost to bind to (used to determine related SSL_CTX)


The documentation for this struct was generated from the following file: