libwebsockets
Lightweight C library for HTML5 websockets
lws-client.h
1 /*
2  * libwebsockets - small server side websockets and web server implementation
3  *
4  * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation:
9  * version 2.1 of the License.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  *
21  * included from libwebsockets.h
22  */
23 
29 
37  LCCSCF_USE_SSL = (1 << 0),
38  LCCSCF_ALLOW_SELFSIGNED = (1 << 1),
39  LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK = (1 << 2),
40  LCCSCF_ALLOW_EXPIRED = (1 << 3),
41 
42  LCCSCF_PIPELINE = (1 << 16),
50 };
51 
56  struct lws_context *context;
58  const char *address;
60  int port;
64  const char *path;
66  const char *host;
68  const char *origin;
70  const char *protocol;
74  void *userdata;
76  const void *client_exts;
78  const char *method;
83  struct lws *parent_wsi;
87  const char *uri_replace_from;
90  const char *uri_replace_to;
92  struct lws_vhost *vhost;
94  struct lws **pwsi;
105  const char *iface;
108  const char *local_protocol_name;
115  const char *alpn;
122  /* Add new things just above here ---^
123  * This is part of the ABI, don't needlessly break compatibility
124  *
125  * The below is to ensure later library versions with new
126  * members added above will see 0 (default) even if the app
127  * was not built against the newer headers.
128  */
129 
130  void *_unused[4];
131 };
132 
140 LWS_VISIBLE LWS_EXTERN struct lws *
142 
168 LWS_VISIBLE LWS_EXTERN int
170  struct lws_vhost *vhost);
191 LWS_VISIBLE LWS_EXTERN int
192 lws_http_client_read(struct lws *wsi, char **buf, int *len);
193 
205 LWS_VISIBLE LWS_EXTERN unsigned int
206 lws_http_client_http_response(struct lws *wsi);
207 
208 LWS_VISIBLE LWS_EXTERN void
209 lws_client_http_body_pending(struct lws *wsi, int something_left_to_send);
210 
231 
lws_client_connect_info::address
const char * address
Definition: lws-client.h:58
lws_http_client_read
LWS_VISIBLE LWS_EXTERN int lws_http_client_read(struct lws *wsi, char **buf, int *len)
lws_client_connect_info::ssl_connection
int ssl_connection
Definition: lws-client.h:62
lws_client_connect_info::uri_replace_from
const char * uri_replace_from
Definition: lws-client.h:87
lws_client_connect_info::protocol
const char * protocol
Definition: lws-client.h:70
lws_http_client_http_response
LWS_VISIBLE LWS_EXTERN unsigned int lws_http_client_http_response(struct lws *wsi)
lws_client_connect_info::ietf_version_or_minus_one
int ietf_version_or_minus_one
Definition: lws-client.h:72
lws_client_connect_info
Definition: lws-client.h:55
lws_client_connect_info::iface
const char * iface
Definition: lws-client.h:105
lws_client_connect_info::parent_wsi
struct lws * parent_wsi
Definition: lws-client.h:83
lws_client_connect_info::path
const char * path
Definition: lws-client.h:64
lws_client_connect_info::context
struct lws_context * context
Definition: lws-client.h:56
lws_client_connect_info::pwsi
struct lws ** pwsi
Definition: lws-client.h:94
lws_context_creation_info
Definition: lws-context-vhost.h:181
lws_client_connect_info::uri_replace_to
const char * uri_replace_to
Definition: lws-client.h:90
LCCSCF_PIPELINE
@ LCCSCF_PIPELINE
Definition: lws-client.h:42
lws_client_connect_info::method
const char * method
Definition: lws-client.h:78
lws_client_connect_info::_unused
void * _unused[4]
Definition: lws-client.h:130
lws_client_connect_info::alpn
const char * alpn
Definition: lws-client.h:115
lws_client_connect_info::port
int port
Definition: lws-client.h:60
lws_client_connect_info::local_protocol_name
const char * local_protocol_name
Definition: lws-client.h:108
lws_client_connect_via_info
LWS_VISIBLE LWS_EXTERN struct lws * lws_client_connect_via_info(const struct lws_client_connect_info *ccinfo)
lws_client_connect_info::origin
const char * origin
Definition: lws-client.h:68
lws_client_connect_info::host
const char * host
Definition: lws-client.h:66
lws_client_connect_ssl_connection_flags
lws_client_connect_ssl_connection_flags
Definition: lws-client.h:36
lws_client_connect_info::client_exts
const void * client_exts
Definition: lws-client.h:76
lws_client_connect_info::vhost
struct lws_vhost * vhost
Definition: lws-client.h:92
lws_init_vhost_client_ssl
LWS_VISIBLE LWS_EXTERN int lws_init_vhost_client_ssl(const struct lws_context_creation_info *info, struct lws_vhost *vhost)
lws_client_connect_info::userdata
void * userdata
Definition: lws-client.h:74