Qore WebSocketUtil Module Reference: doxygen/qlib/WebSocketUtil.qm.dox.h Source File

Qore WebSocketUtil Module Reference 1.0

- Main Page
- Related Pages
- Modules
- Namespaces

All Classes Namespaces Functions Variables Groups Pages
WebSocketUtil.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
4 /* WebSocketUtil.qm Copyright 2013 Qore Technologies, sro
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is 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
22 DEALINGS IN THE SOFTWARE.
23 */
24
25 // minimum required Qore version
26
27 // require type definitions everywhere
28
29 // enable all warnings
30
31
32 /* Version History
33 * 2013-10-04 v1.0: David Nichols <david@qore.org>
34 + the initial version of the WebSocketUtil module
35 */
36
55 namespace WebSocketUtil {
58 const WS_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
59
61 const WS_FIN = (1 << 7);
62
66 const WSOP_Continuation = 0x0;
68
70 const WSOP_Text = 0x1;
71
73 const WSOP_Binary = 0x2;
74
76 const WSOP_Close = 0x8;
77
79 const WSOP_Ping = 0x9;
80
82 const WSOP_Pong = 0xa;
83
85 const WSOPMap = (
86 WSOP_Continuation: "CONTINUATION",
87 WSOP_Text: "TEXT",
88 WSOP_Binary: "BINARY",
89 WSOP_Close: "CLOSE",
90 WSOP_Ping: "PING",
91 WSOP_Pong: "PONG",
92 );
94
98 const WSCC_NormalClosure = 1000;
100
102 const WSCC_GoingAway = 1001;
103
105 const WSCC_ProtocolError = 1002;
106
108 const WSCC_UnsupportedData = 1003;
109
111 const WSCC_NoStatusRcvd = 1005;
112
114 const WSCC_AbnormalClosure = 1006;
115
117 const WSCC_InvalidData = 1007;
118
120 const WSCC_PolicyViolation = 1008;
121
123 const WSCC_MessageTooBig = 1009;
124
126 const WSCC_MandatoryExt = 1010;
127
129 const WSCC_InternalServerError = 1011;
130
132 const WSCC_TlsHandshake = 1015;
133
135 const WSCCMap = (
136 WSCC_NormalClosure: "Normal Closure",
137 WSCC_GoingAway: "Going Away",
138 WSCC_ProtocolError: "Protocol Error",
139 WSCC_UnsupportedData: "Unsupported Data",
140 WSCC_NoStatusRcvd: "No Status Rcvd",
141 WSCC_AbnormalClosure: "Abnormal Closure",
142 WSCC_InvalidData: "Invalid Frame Payload Data",
143 WSCC_PolicyViolation: "Policy Violation",
144 WSCC_MessageTooBig: "Message Too Big",
145 WSCC_MandatoryExt: "Mandatory Ext.",
146 WSCC_InternalServerError: "Internal Server Error",
147 WSCC_TlsHandshake: "TLS Handshake",
148 );
150
152 binary ws_encode_message(data msg, int op = -1, *bool masked);
153
154
156
170 hash ws_read_message(Socket sock, *timeout to);
171
172 };
WebSocketUtil::WSCC_GoingAway
const WSCC_GoingAway
"Going Away" code
Definition: WebSocketUtil.qm.dox.h:102
WebSocketUtil::WSOPMap
const WSOPMap
maps from opcodes to text descriptions
Definition: WebSocketUtil.qm.dox.h:85
WebSocketUtil::WSOP_Continuation
const WSOP_Continuation
continuation frame opcode
Definition: WebSocketUtil.qm.dox.h:67
binary
binary binary()
WebSocketUtil::WSOP_Close
const WSOP_Close
connection code opcode
Definition: WebSocketUtil.qm.dox.h:76
WebSocketUtil::WSOP_Pong
const WSOP_Pong
pong opcode
Definition: WebSocketUtil.qm.dox.h:82
WebSocketUtil::WSCC_NoStatusRcvd
const WSCC_NoStatusRcvd
"No Status Rcvd" code
Definition: WebSocketUtil.qm.dox.h:111
WebSocketUtil::WSCC_MandatoryExt
const WSCC_MandatoryExt
"Mandatory Ext." code
Definition: WebSocketUtil.qm.dox.h:126
WebSocketUtil::WSCC_UnsupportedData
const WSCC_UnsupportedData
"Unsupported Data" code
Definition: WebSocketUtil.qm.dox.h:108
WebSocketUtil::WSCC_ProtocolError
const WSCC_ProtocolError
"Protocol Error" code
Definition: WebSocketUtil.qm.dox.h:105
WebSocketUtil::WS_GUID
const WS_GUID
WebSocket GUID.
Definition: WebSocketUtil.qm.dox.h:58
WebSocketUtil::WSCC_InvalidData
const WSCC_InvalidData
"Invalid Frame Payload Data" code
Definition: WebSocketUtil.qm.dox.h:117
WebSocketUtil::WSCCMap
const WSCCMap
maps from close codes to text descriptions
Definition: WebSocketUtil.qm.dox.h:135
WebSocketUtil::ws_read_message
hash ws_read_message(Socket sock, *timeout to)
read and decode a message from a socket
WebSocketUtil::WSOP_Binary
const WSOP_Binary
binary frame opcode
Definition: WebSocketUtil.qm.dox.h:73
WebSocketUtil::WSCC_MessageTooBig
const WSCC_MessageTooBig
"Message Too Big" code
Definition: WebSocketUtil.qm.dox.h:123
WebSocketUtil::WSOP_Ping
const WSOP_Ping
ping opcode
Definition: WebSocketUtil.qm.dox.h:79
WebSocketUtil::ws_encode_message
binary ws_encode_message(data msg, int op=-1, *bool masked)
encodes a message for sending over a websocket socket
WebSocketUtil::WSOP_Text
const WSOP_Text
text frame opcode
Definition: WebSocketUtil.qm.dox.h:70
WebSocketUtil::WSCC_InternalServerError
const WSCC_InternalServerError
"Internal Server Error" code
Definition: WebSocketUtil.qm.dox.h:129
WebSocketUtil::WSCC_TlsHandshake
const WSCC_TlsHandshake
"TLS Handshake" code
Definition: WebSocketUtil.qm.dox.h:132
WebSocketUtil::WSCC_AbnormalClosure
const WSCC_AbnormalClosure
"Abnormal Closure" code
Definition: WebSocketUtil.qm.dox.h:114
WebSocketUtil::WSCC_NormalClosure
const WSCC_NormalClosure
"Normal Closure" code
Definition: WebSocketUtil.qm.dox.h:99
hash
hash hash(object obj)
WebSocketUtil::WS_FIN
const WS_FIN
the final fragment in a message
Definition: WebSocketUtil.qm.dox.h:61
WebSocketUtil::WSCC_PolicyViolation
const WSCC_PolicyViolation
"Policy Violation" code
Definition: WebSocketUtil.qm.dox.h:120