libwebsockets
Lightweight C library for HTML5 websockets
lws_client_connect_info Struct Reference

#include <lws-client.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 void * client_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
 
const char * iface
 
const char * local_protocol_name
 
const char * alpn
 
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

◆ alpn

const char* lws_client_connect_info::alpn

NULL: allow lws default ALPN list, from vhost if present or from list of roles built into lws non-NULL: require one from provided comma-separated list of alpn tokens

◆ client_exts

const void* lws_client_connect_info::client_exts

UNUSED... provide in info.extensions at context creation time

◆ 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

◆ iface

const char* lws_client_connect_info::iface

NULL to allow routing on any interface, or interface name or IP to bind the socket to

◆ local_protocol_name

const char* lws_client_connect_info::local_protocol_name

NULL: .protocol is used both to select the local protocol handler to bind to and as the list of remote ws protocols we could accept. non-NULL: this protocol name is used to bind the connection to the local protocol handler. .protocol is used for the list of remote ws protocols we could accept

◆ 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. "RAW" gets you a connected socket that lws itself will leave alone once connected.

◆ 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

0, or a combination of LCCSCF_ flags

◆ 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: