libwebsockets
Lightweight C library for HTML5 websockets
lws-ws-close.h
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
33
34/*
35 * NOTE: These public enums are part of the abi. If you want to add one,
36 * add it at where specified so existing users are unaffected.
37 */
40 LWS_CLOSE_STATUS_NOSTATUS = 0,
102 LWS_CLOSE_STATUS_CLIENT_TRANSACTION_DONE = 2000,
103
104 /****** add new things just above ---^ ******/
105
106 LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999,
107};
108
121LWS_VISIBLE LWS_EXTERN void
122lws_close_reason(struct lws *wsi, enum lws_close_status status,
123 unsigned char *buf, size_t len);
124
LWS_VISIBLE LWS_EXTERN void lws_close_reason(struct lws *wsi, enum lws_close_status status, unsigned char *buf, size_t len)
lws_close_status
Definition: lws-ws-close.h:39
@ LWS_CLOSE_STATUS_PROTOCOL_ERR
Definition: lws-ws-close.h:47
@ LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE
Definition: lws-ws-close.h:79
@ LWS_CLOSE_STATUS_NORMAL
Definition: lws-ws-close.h:41
@ LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE
Definition: lws-ws-close.h:50
@ LWS_CLOSE_STATUS_NO_STATUS
Definition: lws-ws-close.h:57
@ LWS_CLOSE_STATUS_ABNORMAL_CLOSE
Definition: lws-ws-close.h:62
@ LWS_CLOSE_STATUS_INVALID_PAYLOAD
Definition: lws-ws-close.h:68
@ LWS_CLOSE_STATUS_GOINGAWAY
Definition: lws-ws-close.h:44
@ LWS_CLOSE_STATUS_EXTENSION_REQUIRED
Definition: lws-ws-close.h:83
@ LWS_CLOSE_STATUS_UNEXPECTED_CONDITION
Definition: lws-ws-close.h:91
@ LWS_CLOSE_STATUS_POLICY_VIOLATION
Definition: lws-ws-close.h:73
@ LWS_CLOSE_STATUS_TLS_FAILURE
Definition: lws-ws-close.h:95
@ LWS_CLOSE_STATUS_RESERVED
Definition: lws-ws-close.h:55