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 
30 
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  LCCSCF_ALLOW_INSECURE = (1 << 4),
42 
43  LCCSCF_PIPELINE = (1 << 16),
51 };
52 
57  struct lws_context *context;
59  const char *address;
61  int port;
65  const char *path;
67  const char *host;
69  const char *origin;
71  const char *protocol;
75  void *userdata;
77  const void *client_exts;
79  const char *method;
84  struct lws *parent_wsi;
88  const char *uri_replace_from;
91  const char *uri_replace_to;
93  struct lws_vhost *vhost;
95  struct lws **pwsi;
106  const char *iface;
109  const char *local_protocol_name;
116  const char *alpn;
123  lws_seq_t *seq;
135  /* Add new things just above here ---^
136  * This is part of the ABI, don't needlessly break compatibility
137  *
138  * The below is to ensure later library versions with new
139  * members added above will see 0 (default) even if the app
140  * was not built against the newer headers.
141  */
142 
143  void *_unused[4];
144 };
145 
153 LWS_VISIBLE LWS_EXTERN struct lws *
155 
181 LWS_VISIBLE LWS_EXTERN int
183  struct lws_vhost *vhost);
204 LWS_VISIBLE LWS_EXTERN int
205 lws_http_client_read(struct lws *wsi, char **buf, int *len);
206 
218 LWS_VISIBLE LWS_EXTERN unsigned int
220 
221 LWS_VISIBLE LWS_EXTERN void
222 lws_client_http_body_pending(struct lws *wsi, int something_left_to_send);
223 
LWS_VISIBLE LWS_EXTERN int lws_http_client_read(struct lws *wsi, char **buf, int *len)
LWS_VISIBLE LWS_EXTERN int lws_init_vhost_client_ssl(const struct lws_context_creation_info *info, struct lws_vhost *vhost)
LWS_VISIBLE LWS_EXTERN struct lws * lws_client_connect_via_info(const struct lws_client_connect_info *ccinfo)
LWS_VISIBLE LWS_EXTERN unsigned int lws_http_client_http_response(struct lws *wsi)
lws_client_connect_ssl_connection_flags
Definition: lws-client.h:36
@ LCCSCF_PIPELINE
Definition: lws-client.h:43
Definition: lws-client.h:56
const char * uri_replace_from
Definition: lws-client.h:88
struct lws ** pwsi
Definition: lws-client.h:95
const char * alpn
Definition: lws-client.h:116
int port
Definition: lws-client.h:61
struct lws_vhost * vhost
Definition: lws-client.h:93
lws_seq_t * seq
Definition: lws-client.h:123
struct lws * parent_wsi
Definition: lws-client.h:84
int ietf_version_or_minus_one
Definition: lws-client.h:73
const char * path
Definition: lws-client.h:65
const char * origin
Definition: lws-client.h:69
void * userdata
Definition: lws-client.h:75
int ssl_connection
Definition: lws-client.h:63
const char * uri_replace_to
Definition: lws-client.h:91
const char * host
Definition: lws-client.h:67
void * opaque_user_data
Definition: lws-client.h:128
const char * address
Definition: lws-client.h:59
const char * method
Definition: lws-client.h:79
const void * client_exts
Definition: lws-client.h:77
const char * protocol
Definition: lws-client.h:71
const char * local_protocol_name
Definition: lws-client.h:109
const char * iface
Definition: lws-client.h:106
void * _unused[4]
Definition: lws-client.h:143
struct lws_context * context
Definition: lws-client.h:57
Definition: lws-context-vhost.h:231