libwebsockets
Lightweight C library for HTML5 websockets
lws-writeable.h
Go to the documentation of this file.
1 /*
2  * libwebsockets - small server side websockets and web server implementation
3  *
4  * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22  * IN THE SOFTWARE.
23  */
24 
44 
57 lws_callback_on_writable(struct lws *wsi);
58 
73 lws_callback_on_writable_all_protocol(const struct lws_context *context,
74  const struct lws_protocols *protocol);
75 
90 lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost,
91  const struct lws_protocols *protocol);
92 
110 lws_callback_all_protocol(struct lws_context *context,
111  const struct lws_protocols *protocol, int reason);
112 
127 lws_callback_all_protocol_vhost(struct lws_vhost *vh,
128  const struct lws_protocols *protocol,
129  int reason)
131 
146 LWS_VISIBLE int
148  const struct lws_protocols *protocol,
149  int reason, void *argp, size_t len);
150 
169 lws_callback_vhost_protocols(struct lws *wsi, int reason, void *in, size_t len)
171 
186 lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in,
187  size_t len);
188 
190 lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
191  void *user, void *in, size_t len);
192 
201 lws_get_socket_fd(struct lws *wsi);
202 
226 
240 #define LWSTXCR_US_TO_PEER 0
241 #define LWSTXCR_PEER_TO_US 1
242 
244 lws_wsi_tx_credit(struct lws *wsi, char peer_to_us, int add);
245 
LWS_VISIBLE LWS_EXTERN int lws_wsi_tx_credit(struct lws *wsi, char peer_to_us, int add)
LWS_VISIBLE int lws_callback_all_protocol_vhost_args(struct lws_vhost *vh, const struct lws_protocols *protocol, int reason, void *argp, size_t len)
LWS_VISIBLE LWS_EXTERN lws_sockfd_type lws_get_socket_fd(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost, const struct lws_protocols *protocol)
LWS_VISIBLE LWS_EXTERN int lws_callback_on_writable(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_callback_all_protocol_vhost(struct lws_vhost *vh, const struct lws_protocols *protocol, int reason) LWS_WARN_DEPRECATED
LWS_VISIBLE LWS_EXTERN int lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len)
LWS_VISIBLE LWS_EXTERN lws_fileofs_t lws_get_peer_write_allowance(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_callback_on_writable_all_protocol(const struct lws_context *context, const struct lws_protocols *protocol)
LWS_VISIBLE LWS_EXTERN int lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in, size_t len)
LWS_VISIBLE LWS_EXTERN int lws_callback_all_protocol(struct lws_context *context, const struct lws_protocols *protocol, int reason)
LWS_VISIBLE LWS_EXTERN int lws_callback_vhost_protocols(struct lws *wsi, int reason, void *in, size_t len) LWS_WARN_DEPRECATED
lws_callback_reasons
Definition: lws-callbacks.h:99
#define LWS_WARN_DEPRECATED
long long lws_fileofs_t
#define LWS_EXTERN
int lws_sockfd_type
#define LWS_VISIBLE