libwebsockets
Lightweight C library for HTML5 websockets
Toggle main menu visibility
Loading...
Searching...
No Matches
lws-ws-close.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
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
*/
39
enum
lws_close_status
{
40
LWS_CLOSE_STATUS_NOSTATUS
= 0,
41
LWS_CLOSE_STATUS_NORMAL
= 1000,
44
LWS_CLOSE_STATUS_GOINGAWAY
= 1001,
47
LWS_CLOSE_STATUS_PROTOCOL_ERR
= 1002,
50
LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE
= 1003,
55
LWS_CLOSE_STATUS_RESERVED
= 1004,
57
LWS_CLOSE_STATUS_NO_STATUS
= 1005,
62
LWS_CLOSE_STATUS_ABNORMAL_CLOSE
= 1006,
68
LWS_CLOSE_STATUS_INVALID_PAYLOAD
= 1007,
73
LWS_CLOSE_STATUS_POLICY_VIOLATION
= 1008,
79
LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE
= 1009,
83
LWS_CLOSE_STATUS_EXTENSION_REQUIRED
= 1010,
91
LWS_CLOSE_STATUS_UNEXPECTED_CONDITION
= 1011,
95
LWS_CLOSE_STATUS_TLS_FAILURE
= 1015,
101
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
121
LWS_VISIBLE
LWS_EXTERN
void
122
lws_close_reason
(
struct
lws *wsi,
enum
lws_close_status
status,
123
unsigned
char
*buf,
size_t
len);
124
lws_close_reason
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
lws_close_status
Definition
lws-ws-close.h:39
LWS_CLOSE_STATUS_PROTOCOL_ERR
@ LWS_CLOSE_STATUS_PROTOCOL_ERR
Definition
lws-ws-close.h:47
LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE
@ LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE
Definition
lws-ws-close.h:79
LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY
@ LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY
Definition
lws-ws-close.h:106
LWS_CLOSE_STATUS_NORMAL
@ LWS_CLOSE_STATUS_NORMAL
Definition
lws-ws-close.h:41
LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE
@ LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE
Definition
lws-ws-close.h:50
LWS_CLOSE_STATUS_NO_STATUS
@ LWS_CLOSE_STATUS_NO_STATUS
Definition
lws-ws-close.h:57
LWS_CLOSE_STATUS_ABNORMAL_CLOSE
@ LWS_CLOSE_STATUS_ABNORMAL_CLOSE
Definition
lws-ws-close.h:62
LWS_CLOSE_STATUS_INVALID_PAYLOAD
@ LWS_CLOSE_STATUS_INVALID_PAYLOAD
Definition
lws-ws-close.h:68
LWS_CLOSE_STATUS_GOINGAWAY
@ LWS_CLOSE_STATUS_GOINGAWAY
Definition
lws-ws-close.h:44
LWS_CLOSE_STATUS_CLIENT_TRANSACTION_DONE
@ LWS_CLOSE_STATUS_CLIENT_TRANSACTION_DONE
Definition
lws-ws-close.h:102
LWS_CLOSE_STATUS_EXTENSION_REQUIRED
@ LWS_CLOSE_STATUS_EXTENSION_REQUIRED
Definition
lws-ws-close.h:83
LWS_CLOSE_STATUS_NOSTATUS
@ LWS_CLOSE_STATUS_NOSTATUS
Definition
lws-ws-close.h:40
LWS_CLOSE_STATUS_UNEXPECTED_CONDITION
@ LWS_CLOSE_STATUS_UNEXPECTED_CONDITION
Definition
lws-ws-close.h:91
LWS_CLOSE_STATUS_POLICY_VIOLATION
@ LWS_CLOSE_STATUS_POLICY_VIOLATION
Definition
lws-ws-close.h:73
LWS_CLOSE_STATUS_TLS_FAILURE
@ LWS_CLOSE_STATUS_TLS_FAILURE
Definition
lws-ws-close.h:95
LWS_CLOSE_STATUS_RESERVED
@ LWS_CLOSE_STATUS_RESERVED
Definition
lws-ws-close.h:55
LWS_EXTERN
#define LWS_EXTERN
Definition
libwebsockets.h:296
LWS_VISIBLE
#define LWS_VISIBLE
Definition
libwebsockets.h:291
include
libwebsockets
lws-ws-close.h
Generated on
for libwebsockets by
1.18.0