line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
* This file was generated automatically by ExtUtils::ParseXS version 3.34 from the |
3
|
|
|
|
|
|
|
* contents of Fast.xs. Do not edit this file, edit Fast.xs instead. |
4
|
|
|
|
|
|
|
* |
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
6
|
|
|
|
|
|
|
* |
7
|
|
|
|
|
|
|
*/ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "Fast.xs" |
10
|
|
|
|
|
|
|
#include |
11
|
|
|
|
|
|
|
#include |
12
|
|
|
|
|
|
|
#include |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#include |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
using namespace xs; |
17
|
|
|
|
|
|
|
using xs::exp::autoexport; |
18
|
|
|
|
|
|
|
using xs::exp::create_constant; |
19
|
|
|
|
|
|
|
using xs::exp::create_constants; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
using panda::string; |
22
|
|
|
|
|
|
|
using panda::string_view; |
23
|
|
|
|
|
|
|
using panda::ErrorCode; |
24
|
|
|
|
|
|
|
using xs::my_perl; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
using namespace xs::protocol::websocket; |
27
|
|
|
|
|
|
|
using namespace panda::protocol::websocket; |
28
|
|
|
|
|
|
|
using xs::protocol::http::strings_to_sv; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#line 31 "Fast_xsgen.cc" |
31
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
32
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
33
|
|
|
|
|
|
|
#endif |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
#ifndef dVAR |
36
|
|
|
|
|
|
|
# define dVAR dNOOP |
37
|
|
|
|
|
|
|
#endif |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
41
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
42
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
43
|
|
|
|
|
|
|
#endif |
44
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
45
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
46
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
47
|
|
|
|
|
|
|
#endif |
48
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
49
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
50
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
51
|
|
|
|
|
|
|
#endif |
52
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
53
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
54
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
55
|
|
|
|
|
|
|
#endif |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
58
|
|
|
|
|
|
|
* XS macro. |
59
|
|
|
|
|
|
|
* |
60
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
61
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
62
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
63
|
|
|
|
|
|
|
* |
64
|
|
|
|
|
|
|
* See XSUB.h in core! |
65
|
|
|
|
|
|
|
*/ |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
69
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
70
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
71
|
|
|
|
|
|
|
# undef XS_INTERNAL |
72
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
73
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
74
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
75
|
|
|
|
|
|
|
# endif |
76
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
77
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
78
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
79
|
|
|
|
|
|
|
# endif |
80
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
81
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
82
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
83
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
84
|
|
|
|
|
|
|
# else |
85
|
|
|
|
|
|
|
# ifdef __cplusplus |
86
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
87
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
88
|
|
|
|
|
|
|
# else |
89
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
90
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
91
|
|
|
|
|
|
|
# endif |
92
|
|
|
|
|
|
|
# endif |
93
|
|
|
|
|
|
|
# endif |
94
|
|
|
|
|
|
|
#endif |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
100
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
101
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
102
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
103
|
|
|
|
|
|
|
*/ |
104
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
105
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
106
|
|
|
|
|
|
|
#endif |
107
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
108
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
109
|
|
|
|
|
|
|
#endif |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
112
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
113
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
114
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
115
|
|
|
|
|
|
|
*/ |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
#undef XS_EUPXS |
118
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
119
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
120
|
|
|
|
|
|
|
#else |
121
|
|
|
|
|
|
|
/* default to internal */ |
122
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
123
|
|
|
|
|
|
|
#endif |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
126
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
129
|
|
|
|
|
|
|
STATIC void |
130
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
STATIC void |
133
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
134
|
|
|
|
|
|
|
{ |
135
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
if (gv) { |
140
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
141
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
142
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
if (hvname) |
145
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
146
|
|
|
|
|
|
|
else |
147
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
148
|
|
|
|
|
|
|
} else { |
149
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
150
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
#endif |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
160
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
161
|
|
|
|
|
|
|
*/ |
162
|
|
|
|
|
|
|
#ifdef newXS_flags |
163
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
164
|
|
|
|
|
|
|
#else |
165
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
166
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
169
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
170
|
|
|
|
|
|
|
#else |
171
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
172
|
|
|
|
|
|
|
#endif |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
#line 175 "Fast_xsgen.cc" |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Parser.xsi' from 'Fast.xs' */ |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
180
|
62
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_configure) { xs::throw_guard(cv, [=]() |
181
|
|
|
|
|
|
|
{ |
182
|
31
|
|
|
|
|
|
dVAR; dXSARGS; |
183
|
31
|
50
|
|
|
|
|
if (items != 2) |
184
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, config"); |
185
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
186
|
31
|
|
|
|
|
|
SP -= items; |
187
|
|
|
|
|
|
|
{ |
188
|
31
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
189
|
|
|
|
|
|
|
; |
190
|
62
|
50
|
|
|
|
|
Parser::Config config = xs::in(ST(1)); |
191
|
|
|
|
|
|
|
; |
192
|
|
|
|
|
|
|
#line 4 "./xsi/Parser.xsi" |
193
|
|
|
|
|
|
|
THIS->configure(config); |
194
|
|
|
|
|
|
|
#line 195 "Fast_xsgen.cc" |
195
|
31
|
|
|
|
|
|
PUTBACK; |
196
|
62
|
|
|
|
|
|
return; |
197
|
|
|
|
|
|
|
} |
198
|
31
|
50
|
|
|
|
|
}); } |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_max_frame_size) { xs::throw_guard(cv, [=]() |
203
|
|
|
|
|
|
|
{ |
204
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
205
|
1
|
50
|
|
|
|
|
if (items != 1) |
206
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
207
|
|
|
|
|
|
|
{ |
208
|
|
|
|
|
|
|
size_t RETVAL; |
209
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
210
|
1
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
211
|
|
|
|
|
|
|
; |
212
|
|
|
|
|
|
|
#line 6 "./xsi/Parser.xsi" |
213
|
|
|
|
|
|
|
RETVAL = THIS->max_frame_size(); |
214
|
|
|
|
|
|
|
#line 215 "Fast_xsgen.cc" |
215
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
216
|
|
|
|
|
|
|
} |
217
|
1
|
|
|
|
|
|
XSRETURN(1); |
218
|
1
|
50
|
|
|
|
|
}); } |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
222
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_max_message_size) { xs::throw_guard(cv, [=]() |
223
|
|
|
|
|
|
|
{ |
224
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
225
|
1
|
50
|
|
|
|
|
if (items != 1) |
226
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
227
|
|
|
|
|
|
|
{ |
228
|
|
|
|
|
|
|
size_t RETVAL; |
229
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
230
|
1
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
231
|
|
|
|
|
|
|
; |
232
|
|
|
|
|
|
|
#line 8 "./xsi/Parser.xsi" |
233
|
|
|
|
|
|
|
RETVAL = THIS->max_message_size(); |
234
|
|
|
|
|
|
|
#line 235 "Fast_xsgen.cc" |
235
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
236
|
|
|
|
|
|
|
} |
237
|
1
|
|
|
|
|
|
XSRETURN(1); |
238
|
1
|
50
|
|
|
|
|
}); } |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_max_handshake_size) { xs::throw_guard(cv, [=]() |
243
|
|
|
|
|
|
|
{ |
244
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
245
|
1
|
50
|
|
|
|
|
if (items != 1) |
246
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
247
|
|
|
|
|
|
|
{ |
248
|
|
|
|
|
|
|
size_t RETVAL; |
249
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
250
|
1
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
251
|
|
|
|
|
|
|
; |
252
|
|
|
|
|
|
|
#line 10 "./xsi/Parser.xsi" |
253
|
|
|
|
|
|
|
RETVAL = THIS->max_handshake_size(); |
254
|
|
|
|
|
|
|
#line 255 "Fast_xsgen.cc" |
255
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
256
|
|
|
|
|
|
|
} |
257
|
1
|
|
|
|
|
|
XSRETURN(1); |
258
|
1
|
50
|
|
|
|
|
}); } |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
262
|
204
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_deflate_config) { xs::throw_guard(cv, [=]() |
263
|
|
|
|
|
|
|
{ |
264
|
102
|
|
|
|
|
|
dVAR; dXSARGS; |
265
|
102
|
50
|
|
|
|
|
if (items != 1) |
266
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
267
|
|
|
|
|
|
|
{ |
268
|
200
|
|
|
|
|
|
Scalar RETVAL; |
269
|
102
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
270
|
|
|
|
|
|
|
; |
271
|
|
|
|
|
|
|
#line 13 "./xsi/Parser.xsi" |
272
|
|
|
|
|
|
|
auto deflate_cfg = THIS->deflate_config(); |
273
|
|
|
|
|
|
|
if (deflate_cfg) { |
274
|
|
|
|
|
|
|
RETVAL = xs::out(deflate_cfg.value()); |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
277
|
|
|
|
|
|
|
#line 278 "Fast_xsgen.cc" |
278
|
|
|
|
|
|
|
{ |
279
|
|
|
|
|
|
|
SV * RETVALSV; |
280
|
98
|
|
|
|
|
|
RETVALSV = NULL; |
281
|
98
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
282
|
98
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
283
|
98
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
284
|
102
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
} |
287
|
102
|
|
|
|
|
|
XSRETURN(1); |
288
|
102
|
50
|
|
|
|
|
}); } |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
|
292
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_effective_deflate_config) { xs::throw_guard(cv, [=]() |
293
|
|
|
|
|
|
|
{ |
294
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
295
|
4
|
50
|
|
|
|
|
if (items != 1) |
296
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
297
|
|
|
|
|
|
|
{ |
298
|
8
|
|
|
|
|
|
Scalar RETVAL; |
299
|
4
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
300
|
|
|
|
|
|
|
; |
301
|
|
|
|
|
|
|
#line 21 "./xsi/Parser.xsi" |
302
|
|
|
|
|
|
|
auto deflate_cfg = THIS->effective_deflate_config(); |
303
|
|
|
|
|
|
|
if (deflate_cfg) { |
304
|
|
|
|
|
|
|
RETVAL = xs::out(deflate_cfg.value()); |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
307
|
|
|
|
|
|
|
#line 308 "Fast_xsgen.cc" |
308
|
|
|
|
|
|
|
{ |
309
|
|
|
|
|
|
|
SV * RETVALSV; |
310
|
4
|
|
|
|
|
|
RETVALSV = NULL; |
311
|
4
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
312
|
4
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
313
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
314
|
4
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
315
|
|
|
|
|
|
|
} |
316
|
|
|
|
|
|
|
} |
317
|
4
|
|
|
|
|
|
XSRETURN(1); |
318
|
4
|
50
|
|
|
|
|
}); } |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
|
322
|
650
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_established) { xs::throw_guard(cv, [=]() |
323
|
|
|
|
|
|
|
{ |
324
|
325
|
|
|
|
|
|
dVAR; dXSARGS; |
325
|
325
|
50
|
|
|
|
|
if (items != 1) |
326
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
327
|
|
|
|
|
|
|
{ |
328
|
|
|
|
|
|
|
bool RETVAL; |
329
|
325
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
330
|
|
|
|
|
|
|
; |
331
|
|
|
|
|
|
|
#line 28 "./xsi/Parser.xsi" |
332
|
|
|
|
|
|
|
RETVAL = THIS->established(); |
333
|
|
|
|
|
|
|
#line 334 "Fast_xsgen.cc" |
334
|
325
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
335
|
|
|
|
|
|
|
} |
336
|
325
|
|
|
|
|
|
XSRETURN(1); |
337
|
325
|
50
|
|
|
|
|
}); } |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
|
341
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_recv_closed) { xs::throw_guard(cv, [=]() |
342
|
|
|
|
|
|
|
{ |
343
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
344
|
0
|
0
|
|
|
|
|
if (items != 1) |
345
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
346
|
|
|
|
|
|
|
{ |
347
|
|
|
|
|
|
|
bool RETVAL; |
348
|
0
|
0
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
349
|
|
|
|
|
|
|
; |
350
|
|
|
|
|
|
|
#line 30 "./xsi/Parser.xsi" |
351
|
|
|
|
|
|
|
RETVAL = THIS->recv_closed(); |
352
|
|
|
|
|
|
|
#line 353 "Fast_xsgen.cc" |
353
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
354
|
|
|
|
|
|
|
} |
355
|
0
|
|
|
|
|
|
XSRETURN(1); |
356
|
0
|
0
|
|
|
|
|
}); } |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
|
360
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_closed) { xs::throw_guard(cv, [=]() |
361
|
|
|
|
|
|
|
{ |
362
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
363
|
0
|
0
|
|
|
|
|
if (items != 1) |
364
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
365
|
|
|
|
|
|
|
{ |
366
|
|
|
|
|
|
|
bool RETVAL; |
367
|
0
|
0
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
368
|
|
|
|
|
|
|
; |
369
|
|
|
|
|
|
|
#line 32 "./xsi/Parser.xsi" |
370
|
|
|
|
|
|
|
RETVAL = THIS->send_closed(); |
371
|
|
|
|
|
|
|
#line 372 "Fast_xsgen.cc" |
372
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
373
|
|
|
|
|
|
|
} |
374
|
0
|
|
|
|
|
|
XSRETURN(1); |
375
|
0
|
0
|
|
|
|
|
}); } |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
|
379
|
186
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_is_deflate_active) { xs::throw_guard(cv, [=]() |
380
|
|
|
|
|
|
|
{ |
381
|
93
|
|
|
|
|
|
dVAR; dXSARGS; |
382
|
93
|
50
|
|
|
|
|
if (items != 1) |
383
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
384
|
|
|
|
|
|
|
{ |
385
|
|
|
|
|
|
|
bool RETVAL; |
386
|
93
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
387
|
|
|
|
|
|
|
; |
388
|
|
|
|
|
|
|
#line 34 "./xsi/Parser.xsi" |
389
|
|
|
|
|
|
|
RETVAL = THIS->is_deflate_active(); |
390
|
|
|
|
|
|
|
#line 391 "Fast_xsgen.cc" |
391
|
93
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
392
|
|
|
|
|
|
|
} |
393
|
93
|
|
|
|
|
|
XSRETURN(1); |
394
|
93
|
50
|
|
|
|
|
}); } |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
|
398
|
144798
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_get_frames) { xs::throw_guard(cv, [=]() |
399
|
|
|
|
|
|
|
{ |
400
|
72399
|
|
|
|
|
|
dVAR; dXSARGS; |
401
|
72399
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
402
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, buf= string()"); |
403
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
404
|
72399
|
|
|
|
|
|
SP -= items; |
405
|
|
|
|
|
|
|
{ |
406
|
72399
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
407
|
|
|
|
|
|
|
; |
408
|
144798
|
|
|
|
|
|
string buf; |
409
|
|
|
|
|
|
|
|
410
|
72399
|
50
|
|
|
|
|
if (items < 2) |
411
|
0
|
0
|
|
|
|
|
buf = string(); |
412
|
|
|
|
|
|
|
else { |
413
|
|
|
|
|
|
|
{ STRLEN __buf_len; |
414
|
72399
|
50
|
|
|
|
|
const char* __buf_buf = SvPV(ST(1), __buf_len); |
|
|
0
|
|
|
|
|
|
415
|
72399
|
50
|
|
|
|
|
buf.assign(__buf_buf, __buf_len); } |
416
|
|
|
|
|
|
|
; |
417
|
|
|
|
|
|
|
} |
418
|
|
|
|
|
|
|
#line 37 "./xsi/Parser.xsi" |
419
|
|
|
|
|
|
|
auto frames = buf ? THIS->get_frames(buf) : THIS->get_frames(); |
420
|
|
|
|
|
|
|
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
421
|
|
|
|
|
|
|
else { |
422
|
|
|
|
|
|
|
if (frames.begin() == frames.end()) XSRETURN_UNDEF; |
423
|
|
|
|
|
|
|
auto itsv = xs::out(new XSFrameIterator(frames.begin())); |
424
|
|
|
|
|
|
|
mPUSHs(itsv.detach()); |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
#line 427 "Fast_xsgen.cc" |
427
|
104
|
|
|
|
|
|
PUTBACK; |
428
|
104
|
|
|
|
|
|
return; |
429
|
|
|
|
|
|
|
} |
430
|
72399
|
50
|
|
|
|
|
}); } |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
|
434
|
7324
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_get_messages) { xs::throw_guard(cv, [=]() |
435
|
|
|
|
|
|
|
{ |
436
|
3662
|
|
|
|
|
|
dVAR; dXSARGS; |
437
|
3662
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
438
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, buf= string()"); |
439
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
440
|
3662
|
|
|
|
|
|
SP -= items; |
441
|
|
|
|
|
|
|
{ |
442
|
3662
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
443
|
|
|
|
|
|
|
; |
444
|
7324
|
|
|
|
|
|
string buf; |
445
|
|
|
|
|
|
|
|
446
|
3662
|
100
|
|
|
|
|
if (items < 2) |
447
|
1
|
50
|
|
|
|
|
buf = string(); |
448
|
|
|
|
|
|
|
else { |
449
|
|
|
|
|
|
|
{ STRLEN __buf_len; |
450
|
3661
|
50
|
|
|
|
|
const char* __buf_buf = SvPV(ST(1), __buf_len); |
|
|
0
|
|
|
|
|
|
451
|
3661
|
50
|
|
|
|
|
buf.assign(__buf_buf, __buf_len); } |
452
|
|
|
|
|
|
|
; |
453
|
|
|
|
|
|
|
} |
454
|
|
|
|
|
|
|
#line 47 "./xsi/Parser.xsi" |
455
|
|
|
|
|
|
|
auto messages = buf ? THIS->get_messages(buf) : THIS->get_messages(); |
456
|
|
|
|
|
|
|
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
457
|
|
|
|
|
|
|
else { |
458
|
|
|
|
|
|
|
if (messages.begin() == messages.end()) XSRETURN_UNDEF; |
459
|
|
|
|
|
|
|
auto itsv = xs::out(new XSMessageIterator(messages.begin())); |
460
|
|
|
|
|
|
|
mPUSHs(itsv.detach()); |
461
|
|
|
|
|
|
|
} |
462
|
|
|
|
|
|
|
#line 463 "Fast_xsgen.cc" |
463
|
178
|
|
|
|
|
|
PUTBACK; |
464
|
178
|
|
|
|
|
|
return; |
465
|
|
|
|
|
|
|
} |
466
|
3662
|
50
|
|
|
|
|
}); } |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
|
470
|
100
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_start_message) { xs::throw_guard(cv, [=]() |
471
|
|
|
|
|
|
|
{ |
472
|
50
|
|
|
|
|
|
dVAR; dXSARGS; |
473
|
50
|
50
|
|
|
|
|
if (items < 1) |
474
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
475
|
|
|
|
|
|
|
{ |
476
|
|
|
|
|
|
|
XSFrameSender * RETVAL; |
477
|
50
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
478
|
|
|
|
|
|
|
; |
479
|
|
|
|
|
|
|
#line 57 "./xsi/Parser.xsi" |
480
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
481
|
|
|
|
|
|
|
Opcode opcode = Opcode::BINARY; |
482
|
|
|
|
|
|
|
auto deflate = DeflateFlag::NO; |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
for (I32 i = 1; i < items - 1; i += 2) { |
485
|
|
|
|
|
|
|
auto name = xs::in(ST(i)); |
486
|
|
|
|
|
|
|
if (!name.length()) continue; |
487
|
|
|
|
|
|
|
auto val = ST(i+1); |
488
|
|
|
|
|
|
|
switch (name[0]) { |
489
|
|
|
|
|
|
|
case 'd': if (name == "deflate") deflate = SvTRUE(val) ? DeflateFlag::YES : DeflateFlag::NO; break; |
490
|
|
|
|
|
|
|
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
491
|
|
|
|
|
|
|
} |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
RETVAL = new XSFrameSender(THIS->start_message(opcode, deflate)); |
495
|
|
|
|
|
|
|
#line 496 "Fast_xsgen.cc" |
496
|
|
|
|
|
|
|
{ |
497
|
|
|
|
|
|
|
SV * RETVALSV; |
498
|
48
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
499
|
48
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
500
|
48
|
|
|
|
|
|
ST(0) = RETVALSV; |
501
|
|
|
|
|
|
|
} |
502
|
|
|
|
|
|
|
} |
503
|
48
|
|
|
|
|
|
XSRETURN(1); |
504
|
50
|
50
|
|
|
|
|
}); } |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
|
508
|
36
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_control) { xs::throw_guard(cv, [=]() |
509
|
|
|
|
|
|
|
{ |
510
|
18
|
|
|
|
|
|
dVAR; dXSARGS; |
511
|
18
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
512
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, opcode, payload= string()"); |
513
|
|
|
|
|
|
|
{ |
514
|
36
|
|
|
|
|
|
Simple RETVAL; |
515
|
18
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
516
|
|
|
|
|
|
|
; |
517
|
18
|
50
|
|
|
|
|
int opcode = (int)SvIV(ST(1)) |
|
|
0
|
|
|
|
|
|
518
|
|
|
|
|
|
|
; |
519
|
36
|
50
|
|
|
|
|
string payload; |
520
|
|
|
|
|
|
|
|
521
|
18
|
100
|
|
|
|
|
if (items < 3) |
522
|
7
|
50
|
|
|
|
|
payload = string(); |
523
|
|
|
|
|
|
|
else { |
524
|
|
|
|
|
|
|
{ STRLEN __payload_len; |
525
|
11
|
50
|
|
|
|
|
const char* __payload_buf = SvPV(ST(2), __payload_len); |
|
|
0
|
|
|
|
|
|
526
|
11
|
50
|
|
|
|
|
payload.assign(__payload_buf, __payload_len); } |
527
|
|
|
|
|
|
|
; |
528
|
|
|
|
|
|
|
} |
529
|
|
|
|
|
|
|
#line 74 "./xsi/Parser.xsi" |
530
|
|
|
|
|
|
|
auto range = THIS->send_control((Opcode)opcode, payload); |
531
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
532
|
|
|
|
|
|
|
#line 533 "Fast_xsgen.cc" |
533
|
|
|
|
|
|
|
{ |
534
|
|
|
|
|
|
|
SV * RETVALSV; |
535
|
18
|
|
|
|
|
|
RETVALSV = NULL; |
536
|
18
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
537
|
18
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
538
|
18
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
539
|
18
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
540
|
|
|
|
|
|
|
} |
541
|
|
|
|
|
|
|
} |
542
|
18
|
|
|
|
|
|
XSRETURN(1); |
543
|
18
|
50
|
|
|
|
|
}); } |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
|
547
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_ping) { xs::throw_guard(cv, [=]() |
548
|
|
|
|
|
|
|
{ |
549
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
550
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
551
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, payload= string()"); |
552
|
|
|
|
|
|
|
{ |
553
|
12
|
|
|
|
|
|
Simple RETVAL; |
554
|
6
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
555
|
|
|
|
|
|
|
; |
556
|
12
|
50
|
|
|
|
|
string payload; |
557
|
|
|
|
|
|
|
|
558
|
6
|
100
|
|
|
|
|
if (items < 2) |
559
|
4
|
50
|
|
|
|
|
payload = string(); |
560
|
|
|
|
|
|
|
else { |
561
|
|
|
|
|
|
|
{ STRLEN __payload_len; |
562
|
2
|
50
|
|
|
|
|
const char* __payload_buf = SvPV(ST(1), __payload_len); |
|
|
0
|
|
|
|
|
|
563
|
2
|
50
|
|
|
|
|
payload.assign(__payload_buf, __payload_len); } |
564
|
|
|
|
|
|
|
; |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
#line 79 "./xsi/Parser.xsi" |
567
|
|
|
|
|
|
|
auto range = THIS->send_ping(payload); |
568
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
569
|
|
|
|
|
|
|
#line 570 "Fast_xsgen.cc" |
570
|
|
|
|
|
|
|
{ |
571
|
|
|
|
|
|
|
SV * RETVALSV; |
572
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
573
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
574
|
6
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
575
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
576
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
577
|
|
|
|
|
|
|
} |
578
|
|
|
|
|
|
|
} |
579
|
6
|
|
|
|
|
|
XSRETURN(1); |
580
|
6
|
50
|
|
|
|
|
}); } |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
|
584
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_pong) { xs::throw_guard(cv, [=]() |
585
|
|
|
|
|
|
|
{ |
586
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
587
|
5
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
588
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, payload= string()"); |
589
|
|
|
|
|
|
|
{ |
590
|
10
|
|
|
|
|
|
Simple RETVAL; |
591
|
5
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
592
|
|
|
|
|
|
|
; |
593
|
10
|
50
|
|
|
|
|
string payload; |
594
|
|
|
|
|
|
|
|
595
|
5
|
100
|
|
|
|
|
if (items < 2) |
596
|
3
|
50
|
|
|
|
|
payload = string(); |
597
|
|
|
|
|
|
|
else { |
598
|
|
|
|
|
|
|
{ STRLEN __payload_len; |
599
|
2
|
50
|
|
|
|
|
const char* __payload_buf = SvPV(ST(1), __payload_len); |
|
|
0
|
|
|
|
|
|
600
|
2
|
50
|
|
|
|
|
payload.assign(__payload_buf, __payload_len); } |
601
|
|
|
|
|
|
|
; |
602
|
|
|
|
|
|
|
} |
603
|
|
|
|
|
|
|
#line 84 "./xsi/Parser.xsi" |
604
|
|
|
|
|
|
|
auto range = THIS->send_pong(payload); |
605
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
606
|
|
|
|
|
|
|
#line 607 "Fast_xsgen.cc" |
607
|
|
|
|
|
|
|
{ |
608
|
|
|
|
|
|
|
SV * RETVALSV; |
609
|
5
|
|
|
|
|
|
RETVALSV = NULL; |
610
|
5
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
611
|
5
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
612
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
613
|
5
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
} |
616
|
5
|
|
|
|
|
|
XSRETURN(1); |
617
|
5
|
50
|
|
|
|
|
}); } |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
|
621
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_close) { xs::throw_guard(cv, [=]() |
622
|
|
|
|
|
|
|
{ |
623
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
624
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
50
|
|
|
|
|
|
625
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, code= NULL, message= string()"); |
626
|
|
|
|
|
|
|
{ |
627
|
8
|
|
|
|
|
|
Simple RETVAL; |
628
|
4
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
629
|
|
|
|
|
|
|
; |
630
|
|
|
|
|
|
|
SV* code; |
631
|
8
|
50
|
|
|
|
|
string message; |
632
|
|
|
|
|
|
|
|
633
|
4
|
100
|
|
|
|
|
if (items < 2) |
634
|
1
|
|
|
|
|
|
code = NULL; |
635
|
|
|
|
|
|
|
else { |
636
|
3
|
|
|
|
|
|
code = ST(1) |
637
|
3
|
|
|
|
|
|
; |
638
|
|
|
|
|
|
|
} |
639
|
|
|
|
|
|
|
|
640
|
4
|
100
|
|
|
|
|
if (items < 3) |
641
|
2
|
50
|
|
|
|
|
message = string(); |
642
|
|
|
|
|
|
|
else { |
643
|
|
|
|
|
|
|
{ STRLEN __message_len; |
644
|
2
|
50
|
|
|
|
|
const char* __message_buf = SvPV(ST(2), __message_len); |
|
|
0
|
|
|
|
|
|
645
|
2
|
50
|
|
|
|
|
message.assign(__message_buf, __message_len); } |
646
|
|
|
|
|
|
|
; |
647
|
|
|
|
|
|
|
} |
648
|
|
|
|
|
|
|
#line 89 "./xsi/Parser.xsi" |
649
|
|
|
|
|
|
|
if (code) { |
650
|
|
|
|
|
|
|
auto range = THIS->send_close((uint16_t)SvUV(code), message); |
651
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
652
|
|
|
|
|
|
|
} |
653
|
|
|
|
|
|
|
else RETVAL = xs::out(THIS->send_close()); |
654
|
|
|
|
|
|
|
#line 655 "Fast_xsgen.cc" |
655
|
|
|
|
|
|
|
{ |
656
|
|
|
|
|
|
|
SV * RETVALSV; |
657
|
4
|
|
|
|
|
|
RETVALSV = NULL; |
658
|
4
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
659
|
4
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
660
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
661
|
4
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
} |
664
|
4
|
|
|
|
|
|
XSRETURN(1); |
665
|
4
|
50
|
|
|
|
|
}); } |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
|
668
|
|
|
|
|
|
|
|
669
|
222
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_send_message) { xs::throw_guard(cv, [=]() |
670
|
|
|
|
|
|
|
{ |
671
|
111
|
|
|
|
|
|
dVAR; dXSARGS; |
672
|
111
|
|
|
|
|
|
dXSI32; |
673
|
111
|
50
|
|
|
|
|
if (items < 1) |
674
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
675
|
|
|
|
|
|
|
{ |
676
|
222
|
|
|
|
|
|
Simple RETVAL; |
677
|
111
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
678
|
|
|
|
|
|
|
; |
679
|
|
|
|
|
|
|
#line 97 "./xsi/Parser.xsi" |
680
|
|
|
|
|
|
|
auto builder = THIS->message(); |
681
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
Sv payload_sv; |
683
|
|
|
|
|
|
|
for (I32 i = 1; i < items - 1; i += 2) { |
684
|
|
|
|
|
|
|
auto name = xs::in(ST(i)); |
685
|
|
|
|
|
|
|
if (!name.length()) continue; |
686
|
|
|
|
|
|
|
auto val = ST(i+1); |
687
|
|
|
|
|
|
|
switch (name[0]) { |
688
|
|
|
|
|
|
|
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
689
|
|
|
|
|
|
|
case 'o': if (name == "opcode") builder.opcode((Opcode)SvIV(val)); break; |
690
|
|
|
|
|
|
|
case 'p': if (name == "payload") payload_sv = val; break; |
691
|
|
|
|
|
|
|
} |
692
|
|
|
|
|
|
|
} |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
if (ix == 0) { // send_message() |
695
|
|
|
|
|
|
|
if (payload_sv.is_array_ref()) { |
696
|
|
|
|
|
|
|
Array payload(payload_sv); |
697
|
|
|
|
|
|
|
std::vector list; |
698
|
|
|
|
|
|
|
av_to_vstring(payload, list); |
699
|
|
|
|
|
|
|
auto range = builder.send(list.begin(), list.end()); |
700
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
else { |
703
|
|
|
|
|
|
|
auto payload = Simple(payload_sv).as_string(); |
704
|
|
|
|
|
|
|
auto range = builder.send(payload); |
705
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
706
|
|
|
|
|
|
|
} |
707
|
|
|
|
|
|
|
} |
708
|
|
|
|
|
|
|
else { // send_message_multiframe() |
709
|
|
|
|
|
|
|
Array payloads(payload_sv); |
710
|
|
|
|
|
|
|
if (!payloads) throw Error("invalid argument (payload must point to array)"); |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
std::vector> cont; |
713
|
|
|
|
|
|
|
for (const auto& payload : payloads) { |
714
|
|
|
|
|
|
|
if (!payload.defined()) continue; |
715
|
|
|
|
|
|
|
std::vector tmp; |
716
|
|
|
|
|
|
|
tmp.push_back(xs::in(payload)); |
717
|
|
|
|
|
|
|
cont.push_back(std::move(tmp)); |
718
|
|
|
|
|
|
|
} |
719
|
|
|
|
|
|
|
|
720
|
|
|
|
|
|
|
auto range = builder.send(cont.begin(), cont.end()); |
721
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
#line 724 "Fast_xsgen.cc" |
724
|
|
|
|
|
|
|
{ |
725
|
|
|
|
|
|
|
SV * RETVALSV; |
726
|
111
|
|
|
|
|
|
RETVALSV = NULL; |
727
|
111
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
728
|
111
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
729
|
111
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
730
|
111
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
731
|
|
|
|
|
|
|
} |
732
|
|
|
|
|
|
|
} |
733
|
111
|
|
|
|
|
|
XSRETURN(1); |
734
|
111
|
50
|
|
|
|
|
}); } |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
|
738
|
264
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_reset) { xs::throw_guard(cv, [=]() |
739
|
|
|
|
|
|
|
{ |
740
|
132
|
|
|
|
|
|
dVAR; dXSARGS; |
741
|
132
|
50
|
|
|
|
|
if (items != 1) |
742
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
743
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
744
|
132
|
|
|
|
|
|
SP -= items; |
745
|
|
|
|
|
|
|
{ |
746
|
132
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
747
|
|
|
|
|
|
|
; |
748
|
|
|
|
|
|
|
#line 142 "./xsi/Parser.xsi" |
749
|
|
|
|
|
|
|
THIS->reset(); |
750
|
|
|
|
|
|
|
#line 751 "Fast_xsgen.cc" |
751
|
132
|
|
|
|
|
|
PUTBACK; |
752
|
132
|
|
|
|
|
|
return; |
753
|
|
|
|
|
|
|
} |
754
|
132
|
50
|
|
|
|
|
}); } |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
|
758
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_suggested_close_code) { xs::throw_guard(cv, [=]() |
759
|
|
|
|
|
|
|
{ |
760
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
761
|
1
|
50
|
|
|
|
|
if (items != 1) |
762
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
763
|
|
|
|
|
|
|
{ |
764
|
|
|
|
|
|
|
uint16_t RETVAL; |
765
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
766
|
1
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
767
|
|
|
|
|
|
|
; |
768
|
|
|
|
|
|
|
#line 144 "./xsi/Parser.xsi" |
769
|
|
|
|
|
|
|
RETVAL = THIS->suggested_close_code(); |
770
|
|
|
|
|
|
|
#line 771 "Fast_xsgen.cc" |
771
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
772
|
|
|
|
|
|
|
} |
773
|
1
|
|
|
|
|
|
XSRETURN(1); |
774
|
1
|
50
|
|
|
|
|
}); } |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
|
778
|
40
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Parser_no_deflate) { xs::throw_guard(cv, [=]() |
779
|
|
|
|
|
|
|
{ |
780
|
20
|
|
|
|
|
|
dVAR; dXSARGS; |
781
|
20
|
50
|
|
|
|
|
if (items != 1) |
782
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
783
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
784
|
20
|
|
|
|
|
|
SP -= items; |
785
|
|
|
|
|
|
|
{ |
786
|
20
|
50
|
|
|
|
|
Parser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
787
|
|
|
|
|
|
|
; |
788
|
|
|
|
|
|
|
#line 146 "./xsi/Parser.xsi" |
789
|
|
|
|
|
|
|
THIS->no_deflate(); |
790
|
|
|
|
|
|
|
#line 791 "Fast_xsgen.cc" |
791
|
20
|
|
|
|
|
|
PUTBACK; |
792
|
20
|
|
|
|
|
|
return; |
793
|
|
|
|
|
|
|
} |
794
|
20
|
50
|
|
|
|
|
}); } |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/Parser.xsi' */ |
798
|
|
|
|
|
|
|
|
799
|
|
|
|
|
|
|
|
800
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/ServerParser.xsi' from 'Fast.xs' */ |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
|
804
|
194
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_new) { xs::throw_guard(cv, [=]() |
805
|
|
|
|
|
|
|
{ |
806
|
97
|
|
|
|
|
|
dVAR; dXSARGS; |
807
|
97
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
808
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, cfg= {}"); |
809
|
|
|
|
|
|
|
{ |
810
|
|
|
|
|
|
|
ServerParser * RETVAL; |
811
|
97
|
|
|
|
|
|
SV* CLASS = ST(0) |
812
|
|
|
|
|
|
|
; |
813
|
194
|
|
|
|
|
|
Parser::Config cfg; |
814
|
|
|
|
|
|
|
|
815
|
97
|
100
|
|
|
|
|
if (items < 2) |
816
|
88
|
50
|
|
|
|
|
cfg = {}; |
817
|
|
|
|
|
|
|
else { |
818
|
9
|
50
|
|
|
|
|
cfg = xs::in(ST(1)); |
|
|
50
|
|
|
|
|
|
819
|
|
|
|
|
|
|
; |
820
|
|
|
|
|
|
|
} |
821
|
|
|
|
|
|
|
#line 8 "./xsi/ServerParser.xsi" |
822
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
823
|
|
|
|
|
|
|
PROTO = CLASS; |
824
|
|
|
|
|
|
|
RETVAL = new ServerParser(cfg); |
825
|
|
|
|
|
|
|
#line 826 "Fast_xsgen.cc" |
826
|
|
|
|
|
|
|
{ |
827
|
|
|
|
|
|
|
SV * RETVALSV; |
828
|
97
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
829
|
97
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
830
|
97
|
|
|
|
|
|
ST(0) = RETVALSV; |
831
|
|
|
|
|
|
|
} |
832
|
|
|
|
|
|
|
} |
833
|
97
|
|
|
|
|
|
XSRETURN(1); |
834
|
97
|
50
|
|
|
|
|
}); } |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
|
838
|
50
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_accept_parsed) { xs::throw_guard(cv, [=]() |
839
|
|
|
|
|
|
|
{ |
840
|
25
|
|
|
|
|
|
dVAR; dXSARGS; |
841
|
25
|
50
|
|
|
|
|
if (items != 1) |
842
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
843
|
|
|
|
|
|
|
{ |
844
|
|
|
|
|
|
|
bool RETVAL; |
845
|
25
|
50
|
|
|
|
|
ServerParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
846
|
|
|
|
|
|
|
; |
847
|
|
|
|
|
|
|
#line 10 "./xsi/ServerParser.xsi" |
848
|
|
|
|
|
|
|
RETVAL = THIS->accept_parsed(); |
849
|
|
|
|
|
|
|
#line 850 "Fast_xsgen.cc" |
850
|
25
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
851
|
|
|
|
|
|
|
} |
852
|
25
|
|
|
|
|
|
XSRETURN(1); |
853
|
25
|
50
|
|
|
|
|
}); } |
854
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
|
857
|
54
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_accepted) { xs::throw_guard(cv, [=]() |
858
|
|
|
|
|
|
|
{ |
859
|
27
|
|
|
|
|
|
dVAR; dXSARGS; |
860
|
27
|
50
|
|
|
|
|
if (items != 1) |
861
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
862
|
|
|
|
|
|
|
{ |
863
|
|
|
|
|
|
|
bool RETVAL; |
864
|
27
|
50
|
|
|
|
|
ServerParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
865
|
|
|
|
|
|
|
; |
866
|
|
|
|
|
|
|
#line 12 "./xsi/ServerParser.xsi" |
867
|
|
|
|
|
|
|
RETVAL = THIS->accepted(); |
868
|
|
|
|
|
|
|
#line 869 "Fast_xsgen.cc" |
869
|
27
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
870
|
|
|
|
|
|
|
} |
871
|
27
|
|
|
|
|
|
XSRETURN(1); |
872
|
27
|
50
|
|
|
|
|
}); } |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
|
876
|
588
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_accept) { xs::throw_guard(cv, [=]() |
877
|
|
|
|
|
|
|
{ |
878
|
294
|
|
|
|
|
|
dVAR; dXSARGS; |
879
|
294
|
50
|
|
|
|
|
if (items != 2) |
880
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, buf"); |
881
|
|
|
|
|
|
|
{ |
882
|
588
|
|
|
|
|
|
ConnectRequestSP RETVAL; |
883
|
294
|
50
|
|
|
|
|
ServerParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
884
|
|
|
|
|
|
|
; |
885
|
588
|
|
|
|
|
|
string buf; |
886
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
{ STRLEN __buf_len; |
888
|
294
|
50
|
|
|
|
|
const char* __buf_buf = SvPV(ST(1), __buf_len); |
|
|
0
|
|
|
|
|
|
889
|
294
|
50
|
|
|
|
|
buf.assign(__buf_buf, __buf_len); } |
890
|
|
|
|
|
|
|
; |
891
|
|
|
|
|
|
|
#line 15 "./xsi/ServerParser.xsi" |
892
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
893
|
|
|
|
|
|
|
RETVAL = THIS->accept(buf); |
894
|
|
|
|
|
|
|
#line 895 "Fast_xsgen.cc" |
895
|
|
|
|
|
|
|
{ |
896
|
|
|
|
|
|
|
SV * RETVALSV; |
897
|
294
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
898
|
294
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
899
|
294
|
|
|
|
|
|
ST(0) = RETVALSV; |
900
|
|
|
|
|
|
|
} |
901
|
|
|
|
|
|
|
} |
902
|
294
|
|
|
|
|
|
XSRETURN(1); |
903
|
294
|
50
|
|
|
|
|
}); } |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
|
907
|
18
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_accept_error) { xs::throw_guard(cv, [=]() |
908
|
|
|
|
|
|
|
{ |
909
|
9
|
|
|
|
|
|
dVAR; dXSARGS; |
910
|
9
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
911
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, res= nullptr"); |
912
|
|
|
|
|
|
|
{ |
913
|
18
|
|
|
|
|
|
string RETVAL; |
914
|
9
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
915
|
9
|
50
|
|
|
|
|
ServerParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
916
|
|
|
|
|
|
|
; |
917
|
18
|
|
|
|
|
|
panda::protocol::http::ResponseSP res; |
918
|
|
|
|
|
|
|
|
919
|
9
|
100
|
|
|
|
|
if (items < 2) |
920
|
6
|
|
|
|
|
|
res = nullptr; |
921
|
|
|
|
|
|
|
else { |
922
|
3
|
50
|
|
|
|
|
res = xs::in(ST(1)); |
923
|
|
|
|
|
|
|
; |
924
|
|
|
|
|
|
|
} |
925
|
|
|
|
|
|
|
#line 19 "./xsi/ServerParser.xsi" |
926
|
|
|
|
|
|
|
if (!res) RETVAL = THIS->accept_error(); |
927
|
|
|
|
|
|
|
else RETVAL = THIS->accept_error(res); |
928
|
|
|
|
|
|
|
#line 929 "Fast_xsgen.cc" |
929
|
9
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
930
|
|
|
|
|
|
|
} |
931
|
9
|
|
|
|
|
|
XSRETURN(1); |
932
|
9
|
50
|
|
|
|
|
}); } |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
|
935
|
|
|
|
|
|
|
|
936
|
412
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ServerParser_accept_response) { xs::throw_guard(cv, [=]() |
937
|
|
|
|
|
|
|
{ |
938
|
206
|
|
|
|
|
|
dVAR; dXSARGS; |
939
|
206
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
940
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, res= nullptr"); |
941
|
|
|
|
|
|
|
{ |
942
|
412
|
|
|
|
|
|
string RETVAL; |
943
|
206
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
944
|
206
|
50
|
|
|
|
|
ServerParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
945
|
|
|
|
|
|
|
; |
946
|
412
|
|
|
|
|
|
ConnectResponseSP res; |
947
|
|
|
|
|
|
|
|
948
|
206
|
100
|
|
|
|
|
if (items < 2) |
949
|
205
|
|
|
|
|
|
res = nullptr; |
950
|
|
|
|
|
|
|
else { |
951
|
1
|
50
|
|
|
|
|
res = xs::in(ST(1)); |
952
|
|
|
|
|
|
|
; |
953
|
|
|
|
|
|
|
} |
954
|
|
|
|
|
|
|
#line 24 "./xsi/ServerParser.xsi" |
955
|
|
|
|
|
|
|
if (!res) RETVAL = THIS->accept_response(); |
956
|
|
|
|
|
|
|
else RETVAL = THIS->accept_response(res); |
957
|
|
|
|
|
|
|
#line 958 "Fast_xsgen.cc" |
958
|
206
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
959
|
|
|
|
|
|
|
} |
960
|
206
|
|
|
|
|
|
XSRETURN(1); |
961
|
206
|
50
|
|
|
|
|
}); } |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/ServerParser.xsi' */ |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/ClientParser.xsi' from 'Fast.xs' */ |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
|
971
|
170
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ClientParser_new) { xs::throw_guard(cv, [=]() |
972
|
|
|
|
|
|
|
{ |
973
|
85
|
|
|
|
|
|
dVAR; dXSARGS; |
974
|
85
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
975
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, cfg= {}"); |
976
|
|
|
|
|
|
|
{ |
977
|
|
|
|
|
|
|
ClientParser * RETVAL; |
978
|
85
|
|
|
|
|
|
SV* CLASS = ST(0) |
979
|
|
|
|
|
|
|
; |
980
|
170
|
|
|
|
|
|
Parser::Config cfg; |
981
|
|
|
|
|
|
|
|
982
|
85
|
100
|
|
|
|
|
if (items < 2) |
983
|
74
|
50
|
|
|
|
|
cfg = {}; |
984
|
|
|
|
|
|
|
else { |
985
|
11
|
50
|
|
|
|
|
cfg = xs::in(ST(1)); |
|
|
50
|
|
|
|
|
|
986
|
|
|
|
|
|
|
; |
987
|
|
|
|
|
|
|
} |
988
|
|
|
|
|
|
|
#line 8 "./xsi/ClientParser.xsi" |
989
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
990
|
|
|
|
|
|
|
PROTO = CLASS; |
991
|
|
|
|
|
|
|
RETVAL = new ClientParser(cfg); |
992
|
|
|
|
|
|
|
#line 993 "Fast_xsgen.cc" |
993
|
|
|
|
|
|
|
{ |
994
|
|
|
|
|
|
|
SV * RETVALSV; |
995
|
85
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
996
|
85
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
997
|
85
|
|
|
|
|
|
ST(0) = RETVALSV; |
998
|
|
|
|
|
|
|
} |
999
|
|
|
|
|
|
|
} |
1000
|
85
|
|
|
|
|
|
XSRETURN(1); |
1001
|
85
|
50
|
|
|
|
|
}); } |
1002
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
|
1005
|
168
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ClientParser_connect_request) { xs::throw_guard(cv, [=]() |
1006
|
|
|
|
|
|
|
{ |
1007
|
84
|
|
|
|
|
|
dVAR; dXSARGS; |
1008
|
84
|
50
|
|
|
|
|
if (items != 2) |
1009
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, req"); |
1010
|
|
|
|
|
|
|
{ |
1011
|
168
|
|
|
|
|
|
string RETVAL; |
1012
|
84
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1013
|
84
|
50
|
|
|
|
|
ClientParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
; |
1015
|
168
|
50
|
|
|
|
|
ConnectRequestSP req = xs::in(ST(1)); |
1016
|
|
|
|
|
|
|
; |
1017
|
|
|
|
|
|
|
#line 10 "./xsi/ClientParser.xsi" |
1018
|
|
|
|
|
|
|
RETVAL = THIS->connect_request(req); |
1019
|
|
|
|
|
|
|
#line 1020 "Fast_xsgen.cc" |
1020
|
80
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
} |
1022
|
80
|
|
|
|
|
|
XSRETURN(1); |
1023
|
84
|
50
|
|
|
|
|
}); } |
1024
|
|
|
|
|
|
|
|
1025
|
|
|
|
|
|
|
|
1026
|
|
|
|
|
|
|
|
1027
|
296
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ClientParser_connect) { xs::throw_guard(cv, [=]() |
1028
|
|
|
|
|
|
|
{ |
1029
|
148
|
|
|
|
|
|
dVAR; dXSARGS; |
1030
|
148
|
50
|
|
|
|
|
if (items != 2) |
1031
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, buf"); |
1032
|
|
|
|
|
|
|
{ |
1033
|
296
|
|
|
|
|
|
ConnectResponseSP RETVAL; |
1034
|
148
|
50
|
|
|
|
|
ClientParser* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1035
|
|
|
|
|
|
|
; |
1036
|
296
|
|
|
|
|
|
string buf; |
1037
|
|
|
|
|
|
|
|
1038
|
|
|
|
|
|
|
{ STRLEN __buf_len; |
1039
|
148
|
50
|
|
|
|
|
const char* __buf_buf = SvPV(ST(1), __buf_len); |
|
|
0
|
|
|
|
|
|
1040
|
148
|
50
|
|
|
|
|
buf.assign(__buf_buf, __buf_len); } |
1041
|
|
|
|
|
|
|
; |
1042
|
|
|
|
|
|
|
#line 13 "./xsi/ClientParser.xsi" |
1043
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1044
|
|
|
|
|
|
|
RETVAL = THIS->connect(buf); |
1045
|
|
|
|
|
|
|
#line 1046 "Fast_xsgen.cc" |
1046
|
|
|
|
|
|
|
{ |
1047
|
|
|
|
|
|
|
SV * RETVALSV; |
1048
|
148
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1049
|
148
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1050
|
148
|
|
|
|
|
|
ST(0) = RETVALSV; |
1051
|
|
|
|
|
|
|
} |
1052
|
|
|
|
|
|
|
} |
1053
|
148
|
|
|
|
|
|
XSRETURN(1); |
1054
|
148
|
50
|
|
|
|
|
}); } |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/ClientParser.xsi' */ |
1058
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
|
1060
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/ConnectRequest.xsi' from 'Fast.xs' */ |
1061
|
|
|
|
|
|
|
|
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
|
1064
|
166
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_new) { xs::throw_guard(cv, [=]() |
1065
|
|
|
|
|
|
|
{ |
1066
|
83
|
|
|
|
|
|
dVAR; dXSARGS; |
1067
|
83
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1068
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, params= Hash()"); |
1069
|
|
|
|
|
|
|
{ |
1070
|
166
|
|
|
|
|
|
ConnectRequestSP RETVAL; |
1071
|
83
|
|
|
|
|
|
SV* CLASS = ST(0) |
1072
|
|
|
|
|
|
|
; |
1073
|
166
|
|
|
|
|
|
Hash params; |
1074
|
|
|
|
|
|
|
|
1075
|
83
|
50
|
|
|
|
|
if (items < 2) |
1076
|
0
|
|
|
|
|
|
params = Hash(); |
1077
|
|
|
|
|
|
|
else { |
1078
|
83
|
50
|
|
|
|
|
params = ST(1); |
1079
|
83
|
50
|
|
|
|
|
if (!params && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1080
|
0
|
|
|
|
|
|
; |
1081
|
|
|
|
|
|
|
} |
1082
|
|
|
|
|
|
|
#line 9 "./xsi/ConnectRequest.xsi" |
1083
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1084
|
|
|
|
|
|
|
PROTO = CLASS; |
1085
|
|
|
|
|
|
|
RETVAL = new ConnectRequest(); |
1086
|
|
|
|
|
|
|
make_request(params, RETVAL); |
1087
|
|
|
|
|
|
|
#line 1088 "Fast_xsgen.cc" |
1088
|
|
|
|
|
|
|
{ |
1089
|
|
|
|
|
|
|
SV * RETVALSV; |
1090
|
83
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1091
|
83
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1092
|
83
|
|
|
|
|
|
ST(0) = RETVALSV; |
1093
|
|
|
|
|
|
|
} |
1094
|
|
|
|
|
|
|
} |
1095
|
83
|
|
|
|
|
|
XSRETURN(1); |
1096
|
83
|
50
|
|
|
|
|
}); } |
1097
|
|
|
|
|
|
|
|
1098
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
|
1100
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_ws_key) { xs::throw_guard(cv, [=]() |
1101
|
|
|
|
|
|
|
{ |
1102
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1103
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1104
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
1105
|
|
|
|
|
|
|
{ |
1106
|
4
|
|
|
|
|
|
string RETVAL; |
1107
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1108
|
2
|
50
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1109
|
|
|
|
|
|
|
; |
1110
|
|
|
|
|
|
|
SV* newval; |
1111
|
|
|
|
|
|
|
|
1112
|
2
|
50
|
|
|
|
|
if (items < 2) |
1113
|
2
|
|
|
|
|
|
newval = NULL; |
1114
|
|
|
|
|
|
|
else { |
1115
|
0
|
|
|
|
|
|
newval = ST(1) |
1116
|
0
|
|
|
|
|
|
; |
1117
|
|
|
|
|
|
|
} |
1118
|
|
|
|
|
|
|
#line 14 "./xsi/ConnectRequest.xsi" |
1119
|
|
|
|
|
|
|
if (newval) { |
1120
|
|
|
|
|
|
|
THIS->ws_key = xs::in(newval); |
1121
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1122
|
|
|
|
|
|
|
} |
1123
|
|
|
|
|
|
|
RETVAL = THIS->ws_key; |
1124
|
|
|
|
|
|
|
#line 1125 "Fast_xsgen.cc" |
1125
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
} |
1127
|
2
|
|
|
|
|
|
XSRETURN(1); |
1128
|
2
|
50
|
|
|
|
|
}); } |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
|
1131
|
|
|
|
|
|
|
|
1132
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_ws_version) { xs::throw_guard(cv, [=]() |
1133
|
|
|
|
|
|
|
{ |
1134
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
1135
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1136
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
1137
|
|
|
|
|
|
|
{ |
1138
|
|
|
|
|
|
|
int RETVAL; |
1139
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1140
|
3
|
50
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1141
|
|
|
|
|
|
|
; |
1142
|
|
|
|
|
|
|
SV* newval; |
1143
|
|
|
|
|
|
|
|
1144
|
3
|
50
|
|
|
|
|
if (items < 2) |
1145
|
3
|
|
|
|
|
|
newval = NULL; |
1146
|
|
|
|
|
|
|
else { |
1147
|
0
|
|
|
|
|
|
newval = ST(1) |
1148
|
0
|
|
|
|
|
|
; |
1149
|
|
|
|
|
|
|
} |
1150
|
|
|
|
|
|
|
#line 22 "./xsi/ConnectRequest.xsi" |
1151
|
|
|
|
|
|
|
if (newval) { |
1152
|
|
|
|
|
|
|
THIS->ws_version = SvIV(newval); |
1153
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1154
|
|
|
|
|
|
|
} |
1155
|
|
|
|
|
|
|
RETVAL = THIS->ws_version; |
1156
|
|
|
|
|
|
|
#line 1157 "Fast_xsgen.cc" |
1157
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
} |
1159
|
3
|
|
|
|
|
|
XSRETURN(1); |
1160
|
3
|
50
|
|
|
|
|
}); } |
1161
|
|
|
|
|
|
|
|
1162
|
|
|
|
|
|
|
|
1163
|
|
|
|
|
|
|
|
1164
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_ws_extensions) { xs::throw_guard(cv, [=]() |
1165
|
|
|
|
|
|
|
{ |
1166
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1167
|
0
|
0
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
0
|
|
|
|
|
|
1168
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, exts_av= Array()"); |
1169
|
|
|
|
|
|
|
{ |
1170
|
0
|
|
|
|
|
|
Array RETVAL; |
1171
|
0
|
0
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1172
|
|
|
|
|
|
|
; |
1173
|
0
|
0
|
|
|
|
|
Array exts_av; |
1174
|
|
|
|
|
|
|
|
1175
|
0
|
0
|
|
|
|
|
if (items < 2) |
1176
|
0
|
|
|
|
|
|
exts_av = Array(); |
1177
|
|
|
|
|
|
|
else { |
1178
|
0
|
0
|
|
|
|
|
exts_av = ST(1); |
1179
|
0
|
0
|
|
|
|
|
if (!exts_av && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1180
|
0
|
|
|
|
|
|
; |
1181
|
|
|
|
|
|
|
} |
1182
|
|
|
|
|
|
|
#line 30 "./xsi/ConnectRequest.xsi" |
1183
|
|
|
|
|
|
|
if (exts_av) { |
1184
|
|
|
|
|
|
|
HeaderValues exts; |
1185
|
|
|
|
|
|
|
av_to_header_values(exts_av, &exts); |
1186
|
|
|
|
|
|
|
THIS->ws_extensions(exts); |
1187
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1188
|
|
|
|
|
|
|
} |
1189
|
|
|
|
|
|
|
|
1190
|
|
|
|
|
|
|
RETVAL = header_values_to_av(THIS->ws_extensions()); |
1191
|
|
|
|
|
|
|
#line 1192 "Fast_xsgen.cc" |
1192
|
|
|
|
|
|
|
{ |
1193
|
|
|
|
|
|
|
SV * RETVALSV; |
1194
|
0
|
|
|
|
|
|
RETVALSV = NULL; |
1195
|
0
|
0
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
1196
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
1197
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1198
|
0
|
0
|
|
|
|
|
ST(0) = RETVALSV; |
1199
|
|
|
|
|
|
|
} |
1200
|
|
|
|
|
|
|
} |
1201
|
0
|
|
|
|
|
|
XSRETURN(1); |
1202
|
0
|
0
|
|
|
|
|
}); } |
1203
|
|
|
|
|
|
|
|
1204
|
|
|
|
|
|
|
|
1205
|
|
|
|
|
|
|
|
1206
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_ws_protocol) { xs::throw_guard(cv, [=]() |
1207
|
|
|
|
|
|
|
{ |
1208
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1209
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1210
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
1211
|
|
|
|
|
|
|
{ |
1212
|
4
|
|
|
|
|
|
string RETVAL; |
1213
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1214
|
2
|
50
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1215
|
|
|
|
|
|
|
; |
1216
|
|
|
|
|
|
|
SV* newval; |
1217
|
|
|
|
|
|
|
|
1218
|
2
|
50
|
|
|
|
|
if (items < 2) |
1219
|
2
|
|
|
|
|
|
newval = NULL; |
1220
|
|
|
|
|
|
|
else { |
1221
|
0
|
|
|
|
|
|
newval = ST(1) |
1222
|
0
|
|
|
|
|
|
; |
1223
|
|
|
|
|
|
|
} |
1224
|
|
|
|
|
|
|
#line 41 "./xsi/ConnectRequest.xsi" |
1225
|
|
|
|
|
|
|
if (newval) { |
1226
|
|
|
|
|
|
|
THIS->ws_protocol = xs::in(newval); |
1227
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1228
|
|
|
|
|
|
|
} |
1229
|
|
|
|
|
|
|
RETVAL = THIS->ws_protocol; |
1230
|
|
|
|
|
|
|
#line 1231 "Fast_xsgen.cc" |
1231
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1232
|
|
|
|
|
|
|
} |
1233
|
2
|
|
|
|
|
|
XSRETURN(1); |
1234
|
2
|
50
|
|
|
|
|
}); } |
1235
|
|
|
|
|
|
|
|
1236
|
|
|
|
|
|
|
|
1237
|
|
|
|
|
|
|
|
1238
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_ws_version_supported) { xs::throw_guard(cv, [=]() |
1239
|
|
|
|
|
|
|
{ |
1240
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1241
|
0
|
0
|
|
|
|
|
if (items != 1) |
1242
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1243
|
|
|
|
|
|
|
{ |
1244
|
|
|
|
|
|
|
bool RETVAL; |
1245
|
0
|
0
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1246
|
|
|
|
|
|
|
; |
1247
|
|
|
|
|
|
|
#line 48 "./xsi/ConnectRequest.xsi" |
1248
|
|
|
|
|
|
|
RETVAL = THIS->ws_version_supported(); |
1249
|
|
|
|
|
|
|
#line 1250 "Fast_xsgen.cc" |
1250
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
1251
|
|
|
|
|
|
|
} |
1252
|
0
|
|
|
|
|
|
XSRETURN(1); |
1253
|
0
|
0
|
|
|
|
|
}); } |
1254
|
|
|
|
|
|
|
|
1255
|
|
|
|
|
|
|
|
1256
|
|
|
|
|
|
|
|
1257
|
122
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectRequest_error) { xs::throw_guard(cv, [=]() |
1258
|
|
|
|
|
|
|
{ |
1259
|
61
|
|
|
|
|
|
dVAR; dXSARGS; |
1260
|
61
|
50
|
|
|
|
|
if (items != 1) |
1261
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1262
|
|
|
|
|
|
|
{ |
1263
|
122
|
|
|
|
|
|
ErrorCode RETVAL; |
1264
|
61
|
50
|
|
|
|
|
ConnectRequest* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1265
|
|
|
|
|
|
|
; |
1266
|
|
|
|
|
|
|
#line 51 "./xsi/ConnectRequest.xsi" |
1267
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1268
|
|
|
|
|
|
|
RETVAL = THIS->error; |
1269
|
|
|
|
|
|
|
#line 1270 "Fast_xsgen.cc" |
1270
|
|
|
|
|
|
|
{ |
1271
|
|
|
|
|
|
|
SV * RETVALSV; |
1272
|
61
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1273
|
61
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1274
|
61
|
|
|
|
|
|
ST(0) = RETVALSV; |
1275
|
|
|
|
|
|
|
} |
1276
|
|
|
|
|
|
|
} |
1277
|
61
|
|
|
|
|
|
XSRETURN(1); |
1278
|
61
|
50
|
|
|
|
|
}); } |
1279
|
|
|
|
|
|
|
|
1280
|
|
|
|
|
|
|
|
1281
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/ConnectRequest.xsi' */ |
1282
|
|
|
|
|
|
|
|
1283
|
|
|
|
|
|
|
|
1284
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/ConnectResponse.xsi' from 'Fast.xs' */ |
1285
|
|
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
|
1287
|
|
|
|
|
|
|
|
1288
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_new) { xs::throw_guard(cv, [=]() |
1289
|
|
|
|
|
|
|
{ |
1290
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
1291
|
1
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1292
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, params= Hash()"); |
1293
|
|
|
|
|
|
|
{ |
1294
|
2
|
|
|
|
|
|
ConnectResponseSP RETVAL; |
1295
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
1296
|
|
|
|
|
|
|
; |
1297
|
2
|
|
|
|
|
|
Hash params; |
1298
|
|
|
|
|
|
|
|
1299
|
1
|
50
|
|
|
|
|
if (items < 2) |
1300
|
0
|
|
|
|
|
|
params = Hash(); |
1301
|
|
|
|
|
|
|
else { |
1302
|
1
|
50
|
|
|
|
|
params = ST(1); |
1303
|
1
|
50
|
|
|
|
|
if (!params && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1304
|
0
|
|
|
|
|
|
; |
1305
|
|
|
|
|
|
|
} |
1306
|
|
|
|
|
|
|
#line 9 "./xsi/ConnectResponse.xsi" |
1307
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1308
|
|
|
|
|
|
|
PROTO = CLASS; |
1309
|
|
|
|
|
|
|
RETVAL = new ConnectResponse(); |
1310
|
|
|
|
|
|
|
make_response(params, RETVAL); |
1311
|
|
|
|
|
|
|
#line 1312 "Fast_xsgen.cc" |
1312
|
|
|
|
|
|
|
{ |
1313
|
|
|
|
|
|
|
SV * RETVALSV; |
1314
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1315
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1316
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
1317
|
|
|
|
|
|
|
} |
1318
|
|
|
|
|
|
|
} |
1319
|
1
|
|
|
|
|
|
XSRETURN(1); |
1320
|
1
|
50
|
|
|
|
|
}); } |
1321
|
|
|
|
|
|
|
|
1322
|
|
|
|
|
|
|
|
1323
|
|
|
|
|
|
|
|
1324
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_ws_accept_key) { xs::throw_guard(cv, [=]() |
1325
|
|
|
|
|
|
|
{ |
1326
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1327
|
2
|
50
|
|
|
|
|
if (items != 1) |
1328
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1329
|
|
|
|
|
|
|
{ |
1330
|
4
|
|
|
|
|
|
string RETVAL; |
1331
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1332
|
2
|
50
|
|
|
|
|
ConnectResponse* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1333
|
|
|
|
|
|
|
; |
1334
|
|
|
|
|
|
|
#line 13 "./xsi/ConnectResponse.xsi" |
1335
|
|
|
|
|
|
|
RETVAL = THIS->ws_accept_key(); |
1336
|
|
|
|
|
|
|
#line 1337 "Fast_xsgen.cc" |
1337
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1338
|
|
|
|
|
|
|
} |
1339
|
2
|
|
|
|
|
|
XSRETURN(1); |
1340
|
2
|
50
|
|
|
|
|
}); } |
1341
|
|
|
|
|
|
|
|
1342
|
|
|
|
|
|
|
|
1343
|
|
|
|
|
|
|
|
1344
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_ws_version) { xs::throw_guard(cv, [=]() |
1345
|
|
|
|
|
|
|
{ |
1346
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1347
|
0
|
0
|
|
|
|
|
if (items != 1) |
1348
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1349
|
|
|
|
|
|
|
{ |
1350
|
0
|
|
|
|
|
|
string RETVAL; |
1351
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1352
|
0
|
0
|
|
|
|
|
ConnectResponse* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1353
|
|
|
|
|
|
|
; |
1354
|
|
|
|
|
|
|
#line 15 "./xsi/ConnectResponse.xsi" |
1355
|
|
|
|
|
|
|
RETVAL = THIS->ws_version(); |
1356
|
|
|
|
|
|
|
#line 1357 "Fast_xsgen.cc" |
1357
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1358
|
|
|
|
|
|
|
} |
1359
|
0
|
|
|
|
|
|
XSRETURN(1); |
1360
|
0
|
0
|
|
|
|
|
}); } |
1361
|
|
|
|
|
|
|
|
1362
|
|
|
|
|
|
|
|
1363
|
|
|
|
|
|
|
|
1364
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_ws_extensions) { xs::throw_guard(cv, [=]() |
1365
|
|
|
|
|
|
|
{ |
1366
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1367
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1368
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, exts_av= Array()"); |
1369
|
|
|
|
|
|
|
{ |
1370
|
4
|
|
|
|
|
|
Array RETVAL; |
1371
|
2
|
50
|
|
|
|
|
ConnectResponse* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1372
|
|
|
|
|
|
|
; |
1373
|
4
|
50
|
|
|
|
|
Array exts_av; |
1374
|
|
|
|
|
|
|
|
1375
|
2
|
50
|
|
|
|
|
if (items < 2) |
1376
|
2
|
|
|
|
|
|
exts_av = Array(); |
1377
|
|
|
|
|
|
|
else { |
1378
|
0
|
0
|
|
|
|
|
exts_av = ST(1); |
1379
|
0
|
0
|
|
|
|
|
if (!exts_av && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1380
|
0
|
|
|
|
|
|
; |
1381
|
|
|
|
|
|
|
} |
1382
|
|
|
|
|
|
|
#line 18 "./xsi/ConnectResponse.xsi" |
1383
|
|
|
|
|
|
|
if (exts_av) { |
1384
|
|
|
|
|
|
|
HeaderValues exts; |
1385
|
|
|
|
|
|
|
av_to_header_values(exts_av, &exts); |
1386
|
|
|
|
|
|
|
THIS->ws_extensions(exts); |
1387
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1388
|
|
|
|
|
|
|
} |
1389
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
RETVAL = header_values_to_av(THIS->ws_extensions()); |
1391
|
|
|
|
|
|
|
#line 1392 "Fast_xsgen.cc" |
1392
|
|
|
|
|
|
|
{ |
1393
|
|
|
|
|
|
|
SV * RETVALSV; |
1394
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
1395
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
1396
|
2
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
1397
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1398
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
1399
|
|
|
|
|
|
|
} |
1400
|
|
|
|
|
|
|
} |
1401
|
2
|
|
|
|
|
|
XSRETURN(1); |
1402
|
2
|
50
|
|
|
|
|
}); } |
1403
|
|
|
|
|
|
|
|
1404
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
|
1406
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_ws_protocol) { xs::throw_guard(cv, [=]() |
1407
|
|
|
|
|
|
|
{ |
1408
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1409
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
1410
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
1411
|
|
|
|
|
|
|
{ |
1412
|
4
|
|
|
|
|
|
string RETVAL; |
1413
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1414
|
2
|
50
|
|
|
|
|
ConnectResponse* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1415
|
|
|
|
|
|
|
; |
1416
|
|
|
|
|
|
|
SV* newval; |
1417
|
|
|
|
|
|
|
|
1418
|
2
|
50
|
|
|
|
|
if (items < 2) |
1419
|
2
|
|
|
|
|
|
newval = NULL; |
1420
|
|
|
|
|
|
|
else { |
1421
|
0
|
|
|
|
|
|
newval = ST(1) |
1422
|
0
|
|
|
|
|
|
; |
1423
|
|
|
|
|
|
|
} |
1424
|
|
|
|
|
|
|
#line 29 "./xsi/ConnectResponse.xsi" |
1425
|
|
|
|
|
|
|
if (newval) { |
1426
|
|
|
|
|
|
|
THIS->ws_protocol = xs::in(newval); |
1427
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
1428
|
|
|
|
|
|
|
} |
1429
|
|
|
|
|
|
|
RETVAL = THIS->ws_protocol; |
1430
|
|
|
|
|
|
|
#line 1431 "Fast_xsgen.cc" |
1431
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1432
|
|
|
|
|
|
|
} |
1433
|
2
|
|
|
|
|
|
XSRETURN(1); |
1434
|
2
|
50
|
|
|
|
|
}); } |
1435
|
|
|
|
|
|
|
|
1436
|
|
|
|
|
|
|
|
1437
|
|
|
|
|
|
|
|
1438
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__ConnectResponse_error) { xs::throw_guard(cv, [=]() |
1439
|
|
|
|
|
|
|
{ |
1440
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
1441
|
14
|
50
|
|
|
|
|
if (items != 1) |
1442
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1443
|
|
|
|
|
|
|
{ |
1444
|
28
|
|
|
|
|
|
ErrorCode RETVAL; |
1445
|
14
|
50
|
|
|
|
|
ConnectResponse* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1446
|
|
|
|
|
|
|
; |
1447
|
|
|
|
|
|
|
#line 37 "./xsi/ConnectResponse.xsi" |
1448
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1449
|
|
|
|
|
|
|
RETVAL = THIS->error; |
1450
|
|
|
|
|
|
|
#line 1451 "Fast_xsgen.cc" |
1451
|
|
|
|
|
|
|
{ |
1452
|
|
|
|
|
|
|
SV * RETVALSV; |
1453
|
14
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1454
|
14
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1455
|
14
|
|
|
|
|
|
ST(0) = RETVALSV; |
1456
|
|
|
|
|
|
|
} |
1457
|
|
|
|
|
|
|
} |
1458
|
14
|
|
|
|
|
|
XSRETURN(1); |
1459
|
14
|
50
|
|
|
|
|
}); } |
1460
|
|
|
|
|
|
|
|
1461
|
|
|
|
|
|
|
|
1462
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/ConnectResponse.xsi' */ |
1463
|
|
|
|
|
|
|
|
1464
|
|
|
|
|
|
|
|
1465
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Frame.xsi' from 'Fast.xs' */ |
1466
|
|
|
|
|
|
|
|
1467
|
|
|
|
|
|
|
|
1468
|
|
|
|
|
|
|
|
1469
|
186
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_error) { xs::throw_guard(cv, [=]() |
1470
|
|
|
|
|
|
|
{ |
1471
|
93
|
|
|
|
|
|
dVAR; dXSARGS; |
1472
|
93
|
50
|
|
|
|
|
if (items != 1) |
1473
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1474
|
|
|
|
|
|
|
{ |
1475
|
186
|
|
|
|
|
|
ErrorCode RETVAL; |
1476
|
93
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1477
|
|
|
|
|
|
|
; |
1478
|
|
|
|
|
|
|
#line 5 "./xsi/Frame.xsi" |
1479
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1480
|
|
|
|
|
|
|
RETVAL = THIS->error; |
1481
|
|
|
|
|
|
|
#line 1482 "Fast_xsgen.cc" |
1482
|
|
|
|
|
|
|
{ |
1483
|
|
|
|
|
|
|
SV * RETVALSV; |
1484
|
93
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1485
|
93
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1486
|
93
|
|
|
|
|
|
ST(0) = RETVALSV; |
1487
|
|
|
|
|
|
|
} |
1488
|
|
|
|
|
|
|
} |
1489
|
93
|
|
|
|
|
|
XSRETURN(1); |
1490
|
93
|
50
|
|
|
|
|
}); } |
1491
|
|
|
|
|
|
|
|
1492
|
|
|
|
|
|
|
|
1493
|
|
|
|
|
|
|
|
1494
|
78
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_opcode) { xs::throw_guard(cv, [=]() |
1495
|
|
|
|
|
|
|
{ |
1496
|
39
|
|
|
|
|
|
dVAR; dXSARGS; |
1497
|
39
|
50
|
|
|
|
|
if (items != 1) |
1498
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1499
|
|
|
|
|
|
|
{ |
1500
|
|
|
|
|
|
|
int RETVAL; |
1501
|
39
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1502
|
39
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1503
|
|
|
|
|
|
|
; |
1504
|
|
|
|
|
|
|
#line 9 "./xsi/Frame.xsi" |
1505
|
|
|
|
|
|
|
RETVAL = (int)THIS->opcode(); |
1506
|
|
|
|
|
|
|
#line 1507 "Fast_xsgen.cc" |
1507
|
39
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
1508
|
|
|
|
|
|
|
} |
1509
|
39
|
|
|
|
|
|
XSRETURN(1); |
1510
|
39
|
50
|
|
|
|
|
}); } |
1511
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
|
1513
|
|
|
|
|
|
|
|
1514
|
64
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_is_control) { xs::throw_guard(cv, [=]() |
1515
|
|
|
|
|
|
|
{ |
1516
|
32
|
|
|
|
|
|
dVAR; dXSARGS; |
1517
|
32
|
50
|
|
|
|
|
if (items != 1) |
1518
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1519
|
|
|
|
|
|
|
{ |
1520
|
|
|
|
|
|
|
bool RETVAL; |
1521
|
32
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1522
|
|
|
|
|
|
|
; |
1523
|
|
|
|
|
|
|
#line 12 "./xsi/Frame.xsi" |
1524
|
|
|
|
|
|
|
RETVAL = THIS->is_control(); |
1525
|
|
|
|
|
|
|
#line 1526 "Fast_xsgen.cc" |
1526
|
32
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
1527
|
|
|
|
|
|
|
} |
1528
|
32
|
|
|
|
|
|
XSRETURN(1); |
1529
|
32
|
50
|
|
|
|
|
}); } |
1530
|
|
|
|
|
|
|
|
1531
|
|
|
|
|
|
|
|
1532
|
|
|
|
|
|
|
|
1533
|
68
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_final) { xs::throw_guard(cv, [=]() |
1534
|
|
|
|
|
|
|
{ |
1535
|
34
|
|
|
|
|
|
dVAR; dXSARGS; |
1536
|
34
|
50
|
|
|
|
|
if (items != 1) |
1537
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1538
|
|
|
|
|
|
|
{ |
1539
|
|
|
|
|
|
|
bool RETVAL; |
1540
|
34
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1541
|
|
|
|
|
|
|
; |
1542
|
|
|
|
|
|
|
#line 14 "./xsi/Frame.xsi" |
1543
|
|
|
|
|
|
|
RETVAL = THIS->final(); |
1544
|
|
|
|
|
|
|
#line 1545 "Fast_xsgen.cc" |
1545
|
34
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
1546
|
|
|
|
|
|
|
} |
1547
|
34
|
|
|
|
|
|
XSRETURN(1); |
1548
|
34
|
50
|
|
|
|
|
}); } |
1549
|
|
|
|
|
|
|
|
1550
|
|
|
|
|
|
|
|
1551
|
|
|
|
|
|
|
|
1552
|
64
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_payload_length) { xs::throw_guard(cv, [=]() |
1553
|
|
|
|
|
|
|
{ |
1554
|
32
|
|
|
|
|
|
dVAR; dXSARGS; |
1555
|
32
|
50
|
|
|
|
|
if (items != 1) |
1556
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1557
|
|
|
|
|
|
|
{ |
1558
|
|
|
|
|
|
|
size_t RETVAL; |
1559
|
32
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1560
|
32
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1561
|
|
|
|
|
|
|
; |
1562
|
|
|
|
|
|
|
#line 16 "./xsi/Frame.xsi" |
1563
|
|
|
|
|
|
|
RETVAL = THIS->payload_length(); |
1564
|
|
|
|
|
|
|
#line 1565 "Fast_xsgen.cc" |
1565
|
32
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
0
|
|
|
|
|
|
1566
|
|
|
|
|
|
|
} |
1567
|
32
|
|
|
|
|
|
XSRETURN(1); |
1568
|
32
|
50
|
|
|
|
|
}); } |
1569
|
|
|
|
|
|
|
|
1570
|
|
|
|
|
|
|
|
1571
|
|
|
|
|
|
|
|
1572
|
114
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_payload) { xs::throw_guard(cv, [=]() |
1573
|
|
|
|
|
|
|
{ |
1574
|
57
|
|
|
|
|
|
dVAR; dXSARGS; |
1575
|
57
|
50
|
|
|
|
|
if (items != 1) |
1576
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1577
|
|
|
|
|
|
|
{ |
1578
|
114
|
|
|
|
|
|
Simple RETVAL; |
1579
|
57
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1580
|
|
|
|
|
|
|
; |
1581
|
|
|
|
|
|
|
#line 19 "./xsi/Frame.xsi" |
1582
|
|
|
|
|
|
|
RETVAL = strings_to_sv(THIS->payload); |
1583
|
|
|
|
|
|
|
#line 1584 "Fast_xsgen.cc" |
1584
|
|
|
|
|
|
|
{ |
1585
|
|
|
|
|
|
|
SV * RETVALSV; |
1586
|
57
|
|
|
|
|
|
RETVALSV = NULL; |
1587
|
57
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
1588
|
57
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
1589
|
57
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1590
|
57
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
1591
|
|
|
|
|
|
|
} |
1592
|
|
|
|
|
|
|
} |
1593
|
57
|
|
|
|
|
|
XSRETURN(1); |
1594
|
57
|
50
|
|
|
|
|
}); } |
1595
|
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
|
1597
|
|
|
|
|
|
|
|
1598
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_close_code) { xs::throw_guard(cv, [=]() |
1599
|
|
|
|
|
|
|
{ |
1600
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
1601
|
8
|
50
|
|
|
|
|
if (items != 1) |
1602
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1603
|
|
|
|
|
|
|
{ |
1604
|
|
|
|
|
|
|
uint16_t RETVAL; |
1605
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1606
|
8
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1607
|
|
|
|
|
|
|
; |
1608
|
|
|
|
|
|
|
#line 22 "./xsi/Frame.xsi" |
1609
|
|
|
|
|
|
|
RETVAL = THIS->close_code(); |
1610
|
|
|
|
|
|
|
#line 1611 "Fast_xsgen.cc" |
1611
|
8
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
0
|
|
|
|
|
|
1612
|
|
|
|
|
|
|
} |
1613
|
8
|
|
|
|
|
|
XSRETURN(1); |
1614
|
8
|
50
|
|
|
|
|
}); } |
1615
|
|
|
|
|
|
|
|
1616
|
|
|
|
|
|
|
|
1617
|
|
|
|
|
|
|
|
1618
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Frame_close_message) { xs::throw_guard(cv, [=]() |
1619
|
|
|
|
|
|
|
{ |
1620
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
1621
|
2
|
50
|
|
|
|
|
if (items != 1) |
1622
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1623
|
|
|
|
|
|
|
{ |
1624
|
4
|
|
|
|
|
|
string RETVAL; |
1625
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1626
|
2
|
50
|
|
|
|
|
Frame* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1627
|
|
|
|
|
|
|
; |
1628
|
|
|
|
|
|
|
#line 24 "./xsi/Frame.xsi" |
1629
|
|
|
|
|
|
|
RETVAL = THIS->close_message(); |
1630
|
|
|
|
|
|
|
#line 1631 "Fast_xsgen.cc" |
1631
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1632
|
|
|
|
|
|
|
} |
1633
|
2
|
|
|
|
|
|
XSRETURN(1); |
1634
|
2
|
50
|
|
|
|
|
}); } |
1635
|
|
|
|
|
|
|
|
1636
|
|
|
|
|
|
|
|
1637
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/Frame.xsi' */ |
1638
|
|
|
|
|
|
|
|
1639
|
|
|
|
|
|
|
|
1640
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/FrameSender.xsi' from 'Fast.xs' */ |
1641
|
|
|
|
|
|
|
|
1642
|
|
|
|
|
|
|
|
1643
|
|
|
|
|
|
|
|
1644
|
122
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__FrameSender_send) { xs::throw_guard(cv, [=]() |
1645
|
|
|
|
|
|
|
{ |
1646
|
61
|
|
|
|
|
|
dVAR; dXSARGS; |
1647
|
61
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
1648
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, payload_sv, final= false"); |
1649
|
|
|
|
|
|
|
{ |
1650
|
122
|
|
|
|
|
|
Simple RETVAL; |
1651
|
61
|
50
|
|
|
|
|
XSFrameSender* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1652
|
|
|
|
|
|
|
; |
1653
|
122
|
50
|
|
|
|
|
Sv payload_sv = ST(1) |
1654
|
|
|
|
|
|
|
; |
1655
|
|
|
|
|
|
|
bool final; |
1656
|
|
|
|
|
|
|
|
1657
|
61
|
100
|
|
|
|
|
if (items < 3) |
1658
|
19
|
|
|
|
|
|
final = false; |
1659
|
|
|
|
|
|
|
else { |
1660
|
42
|
50
|
|
|
|
|
final = (bool)SvTRUE(ST(2)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1661
|
42
|
|
|
|
|
|
; |
1662
|
|
|
|
|
|
|
} |
1663
|
|
|
|
|
|
|
#line 5 "./xsi/FrameSender.xsi" |
1664
|
|
|
|
|
|
|
if (payload_sv.is_array_ref()) { |
1665
|
|
|
|
|
|
|
Array payloads(payload_sv); |
1666
|
|
|
|
|
|
|
std::vector list; |
1667
|
|
|
|
|
|
|
av_to_vstring(payloads, list); |
1668
|
|
|
|
|
|
|
auto range = THIS->send(list.begin(), list.end(), final); |
1669
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
1670
|
|
|
|
|
|
|
} else { |
1671
|
|
|
|
|
|
|
auto payload = Simple(payload_sv).as_string(); |
1672
|
|
|
|
|
|
|
auto range = THIS->send(payload, final); |
1673
|
|
|
|
|
|
|
RETVAL = strings_to_sv(range); |
1674
|
|
|
|
|
|
|
} |
1675
|
|
|
|
|
|
|
#line 1676 "Fast_xsgen.cc" |
1676
|
|
|
|
|
|
|
{ |
1677
|
|
|
|
|
|
|
SV * RETVALSV; |
1678
|
59
|
|
|
|
|
|
RETVALSV = NULL; |
1679
|
59
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
1680
|
59
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
1681
|
59
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1682
|
59
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
1683
|
|
|
|
|
|
|
} |
1684
|
|
|
|
|
|
|
} |
1685
|
59
|
|
|
|
|
|
XSRETURN(1); |
1686
|
61
|
50
|
|
|
|
|
}); } |
1687
|
|
|
|
|
|
|
|
1688
|
|
|
|
|
|
|
|
1689
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/FrameSender.xsi' */ |
1690
|
|
|
|
|
|
|
|
1691
|
|
|
|
|
|
|
|
1692
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/FrameIterator.xsi' from 'Fast.xs' */ |
1693
|
|
|
|
|
|
|
|
1694
|
|
|
|
|
|
|
|
1695
|
|
|
|
|
|
|
|
1696
|
142
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__FrameIterator_next) { xs::throw_guard(cv, [=]() |
1697
|
|
|
|
|
|
|
{ |
1698
|
71
|
|
|
|
|
|
dVAR; dXSARGS; |
1699
|
71
|
50
|
|
|
|
|
if (items != 1) |
1700
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1701
|
|
|
|
|
|
|
{ |
1702
|
142
|
|
|
|
|
|
FrameSP RETVAL; |
1703
|
71
|
50
|
|
|
|
|
XSFrameIterator* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1704
|
|
|
|
|
|
|
; |
1705
|
|
|
|
|
|
|
#line 5 "./xsi/FrameIterator.xsi" |
1706
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1707
|
|
|
|
|
|
|
RETVAL = THIS->next(); |
1708
|
|
|
|
|
|
|
#line 1709 "Fast_xsgen.cc" |
1709
|
|
|
|
|
|
|
{ |
1710
|
|
|
|
|
|
|
SV * RETVALSV; |
1711
|
71
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1712
|
71
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1713
|
71
|
|
|
|
|
|
ST(0) = RETVALSV; |
1714
|
|
|
|
|
|
|
} |
1715
|
|
|
|
|
|
|
} |
1716
|
71
|
|
|
|
|
|
XSRETURN(1); |
1717
|
71
|
50
|
|
|
|
|
}); } |
1718
|
|
|
|
|
|
|
|
1719
|
|
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
|
1721
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__FrameIterator_get_messages) { xs::throw_guard(cv, [=]() |
1722
|
|
|
|
|
|
|
{ |
1723
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
1724
|
5
|
50
|
|
|
|
|
if (items != 1) |
1725
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1726
|
|
|
|
|
|
|
{ |
1727
|
|
|
|
|
|
|
XSMessageIterator * RETVAL; |
1728
|
5
|
50
|
|
|
|
|
XSFrameIterator* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1729
|
|
|
|
|
|
|
; |
1730
|
|
|
|
|
|
|
#line 9 "./xsi/FrameIterator.xsi" |
1731
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1732
|
|
|
|
|
|
|
auto messages = THIS->get_messages(); |
1733
|
|
|
|
|
|
|
if (messages.begin() == messages.end()) XSRETURN_UNDEF; |
1734
|
|
|
|
|
|
|
RETVAL = new XSMessageIterator(messages.begin()); |
1735
|
|
|
|
|
|
|
#line 1736 "Fast_xsgen.cc" |
1736
|
|
|
|
|
|
|
{ |
1737
|
|
|
|
|
|
|
SV * RETVALSV; |
1738
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1739
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1740
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
1741
|
|
|
|
|
|
|
} |
1742
|
|
|
|
|
|
|
} |
1743
|
3
|
|
|
|
|
|
XSRETURN(1); |
1744
|
5
|
50
|
|
|
|
|
}); } |
1745
|
|
|
|
|
|
|
|
1746
|
|
|
|
|
|
|
|
1747
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/FrameIterator.xsi' */ |
1748
|
|
|
|
|
|
|
|
1749
|
|
|
|
|
|
|
|
1750
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Message.xsi' from 'Fast.xs' */ |
1751
|
|
|
|
|
|
|
|
1752
|
|
|
|
|
|
|
|
1753
|
|
|
|
|
|
|
|
1754
|
122
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_error) { xs::throw_guard(cv, [=]() |
1755
|
|
|
|
|
|
|
{ |
1756
|
61
|
|
|
|
|
|
dVAR; dXSARGS; |
1757
|
61
|
50
|
|
|
|
|
if (items != 1) |
1758
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1759
|
|
|
|
|
|
|
{ |
1760
|
122
|
|
|
|
|
|
ErrorCode RETVAL; |
1761
|
61
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1762
|
|
|
|
|
|
|
; |
1763
|
|
|
|
|
|
|
#line 5 "./xsi/Message.xsi" |
1764
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1765
|
|
|
|
|
|
|
RETVAL = THIS->error; |
1766
|
|
|
|
|
|
|
#line 1767 "Fast_xsgen.cc" |
1767
|
|
|
|
|
|
|
{ |
1768
|
|
|
|
|
|
|
SV * RETVALSV; |
1769
|
61
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1770
|
61
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1771
|
61
|
|
|
|
|
|
ST(0) = RETVALSV; |
1772
|
|
|
|
|
|
|
} |
1773
|
|
|
|
|
|
|
} |
1774
|
61
|
|
|
|
|
|
XSRETURN(1); |
1775
|
61
|
50
|
|
|
|
|
}); } |
1776
|
|
|
|
|
|
|
|
1777
|
|
|
|
|
|
|
|
1778
|
|
|
|
|
|
|
|
1779
|
66
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_opcode) { xs::throw_guard(cv, [=]() |
1780
|
|
|
|
|
|
|
{ |
1781
|
33
|
|
|
|
|
|
dVAR; dXSARGS; |
1782
|
33
|
50
|
|
|
|
|
if (items != 1) |
1783
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1784
|
|
|
|
|
|
|
{ |
1785
|
|
|
|
|
|
|
int RETVAL; |
1786
|
33
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1787
|
33
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1788
|
|
|
|
|
|
|
; |
1789
|
|
|
|
|
|
|
#line 9 "./xsi/Message.xsi" |
1790
|
|
|
|
|
|
|
RETVAL = (int)THIS->opcode(); |
1791
|
|
|
|
|
|
|
#line 1792 "Fast_xsgen.cc" |
1792
|
33
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
1793
|
|
|
|
|
|
|
} |
1794
|
33
|
|
|
|
|
|
XSRETURN(1); |
1795
|
33
|
50
|
|
|
|
|
}); } |
1796
|
|
|
|
|
|
|
|
1797
|
|
|
|
|
|
|
|
1798
|
|
|
|
|
|
|
|
1799
|
58
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_is_control) { xs::throw_guard(cv, [=]() |
1800
|
|
|
|
|
|
|
{ |
1801
|
29
|
|
|
|
|
|
dVAR; dXSARGS; |
1802
|
29
|
50
|
|
|
|
|
if (items != 1) |
1803
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1804
|
|
|
|
|
|
|
{ |
1805
|
|
|
|
|
|
|
bool RETVAL; |
1806
|
29
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1807
|
|
|
|
|
|
|
; |
1808
|
|
|
|
|
|
|
#line 12 "./xsi/Message.xsi" |
1809
|
|
|
|
|
|
|
RETVAL = THIS->is_control(); |
1810
|
|
|
|
|
|
|
#line 1811 "Fast_xsgen.cc" |
1811
|
29
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
1812
|
|
|
|
|
|
|
} |
1813
|
29
|
|
|
|
|
|
XSRETURN(1); |
1814
|
29
|
50
|
|
|
|
|
}); } |
1815
|
|
|
|
|
|
|
|
1816
|
|
|
|
|
|
|
|
1817
|
|
|
|
|
|
|
|
1818
|
56
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_payload_length) { xs::throw_guard(cv, [=]() |
1819
|
|
|
|
|
|
|
{ |
1820
|
28
|
|
|
|
|
|
dVAR; dXSARGS; |
1821
|
28
|
50
|
|
|
|
|
if (items != 1) |
1822
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1823
|
|
|
|
|
|
|
{ |
1824
|
|
|
|
|
|
|
size_t RETVAL; |
1825
|
28
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1826
|
28
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1827
|
|
|
|
|
|
|
; |
1828
|
|
|
|
|
|
|
#line 14 "./xsi/Message.xsi" |
1829
|
|
|
|
|
|
|
RETVAL = THIS->payload_length(); |
1830
|
|
|
|
|
|
|
#line 1831 "Fast_xsgen.cc" |
1831
|
28
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
0
|
|
|
|
|
|
1832
|
|
|
|
|
|
|
} |
1833
|
28
|
|
|
|
|
|
XSRETURN(1); |
1834
|
28
|
50
|
|
|
|
|
}); } |
1835
|
|
|
|
|
|
|
|
1836
|
|
|
|
|
|
|
|
1837
|
|
|
|
|
|
|
|
1838
|
316
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_payload) { xs::throw_guard(cv, [=]() |
1839
|
|
|
|
|
|
|
{ |
1840
|
158
|
|
|
|
|
|
dVAR; dXSARGS; |
1841
|
158
|
50
|
|
|
|
|
if (items != 1) |
1842
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1843
|
|
|
|
|
|
|
{ |
1844
|
316
|
|
|
|
|
|
Simple RETVAL; |
1845
|
158
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1846
|
|
|
|
|
|
|
; |
1847
|
|
|
|
|
|
|
#line 17 "./xsi/Message.xsi" |
1848
|
|
|
|
|
|
|
RETVAL = strings_to_sv(THIS->payload); |
1849
|
|
|
|
|
|
|
#line 1850 "Fast_xsgen.cc" |
1850
|
|
|
|
|
|
|
{ |
1851
|
|
|
|
|
|
|
SV * RETVALSV; |
1852
|
158
|
|
|
|
|
|
RETVALSV = NULL; |
1853
|
158
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
1854
|
158
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
1855
|
158
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1856
|
158
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
1857
|
|
|
|
|
|
|
} |
1858
|
|
|
|
|
|
|
} |
1859
|
158
|
|
|
|
|
|
XSRETURN(1); |
1860
|
158
|
50
|
|
|
|
|
}); } |
1861
|
|
|
|
|
|
|
|
1862
|
|
|
|
|
|
|
|
1863
|
|
|
|
|
|
|
|
1864
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_close_code) { xs::throw_guard(cv, [=]() |
1865
|
|
|
|
|
|
|
{ |
1866
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
1867
|
6
|
50
|
|
|
|
|
if (items != 1) |
1868
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1869
|
|
|
|
|
|
|
{ |
1870
|
|
|
|
|
|
|
uint16_t RETVAL; |
1871
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1872
|
6
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1873
|
|
|
|
|
|
|
; |
1874
|
|
|
|
|
|
|
#line 20 "./xsi/Message.xsi" |
1875
|
|
|
|
|
|
|
RETVAL = THIS->close_code(); |
1876
|
|
|
|
|
|
|
#line 1877 "Fast_xsgen.cc" |
1877
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
0
|
|
|
|
|
|
1878
|
|
|
|
|
|
|
} |
1879
|
6
|
|
|
|
|
|
XSRETURN(1); |
1880
|
6
|
50
|
|
|
|
|
}); } |
1881
|
|
|
|
|
|
|
|
1882
|
|
|
|
|
|
|
|
1883
|
|
|
|
|
|
|
|
1884
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_close_message) { xs::throw_guard(cv, [=]() |
1885
|
|
|
|
|
|
|
{ |
1886
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
1887
|
0
|
0
|
|
|
|
|
if (items != 1) |
1888
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1889
|
|
|
|
|
|
|
{ |
1890
|
0
|
|
|
|
|
|
string RETVAL; |
1891
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1892
|
0
|
0
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1893
|
|
|
|
|
|
|
; |
1894
|
|
|
|
|
|
|
#line 22 "./xsi/Message.xsi" |
1895
|
|
|
|
|
|
|
RETVAL = THIS->close_message(); |
1896
|
|
|
|
|
|
|
#line 1897 "Fast_xsgen.cc" |
1897
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1898
|
|
|
|
|
|
|
} |
1899
|
0
|
|
|
|
|
|
XSRETURN(1); |
1900
|
0
|
0
|
|
|
|
|
}); } |
1901
|
|
|
|
|
|
|
|
1902
|
|
|
|
|
|
|
|
1903
|
|
|
|
|
|
|
|
1904
|
88
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__Message_frame_count) { xs::throw_guard(cv, [=]() |
1905
|
|
|
|
|
|
|
{ |
1906
|
44
|
|
|
|
|
|
dVAR; dXSARGS; |
1907
|
44
|
50
|
|
|
|
|
if (items != 1) |
1908
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1909
|
|
|
|
|
|
|
{ |
1910
|
|
|
|
|
|
|
int RETVAL; |
1911
|
44
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
1912
|
44
|
50
|
|
|
|
|
Message* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1913
|
|
|
|
|
|
|
; |
1914
|
|
|
|
|
|
|
#line 25 "./xsi/Message.xsi" |
1915
|
|
|
|
|
|
|
RETVAL = THIS->frame_count; |
1916
|
|
|
|
|
|
|
#line 1917 "Fast_xsgen.cc" |
1917
|
44
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
1918
|
|
|
|
|
|
|
} |
1919
|
44
|
|
|
|
|
|
XSRETURN(1); |
1920
|
44
|
50
|
|
|
|
|
}); } |
1921
|
|
|
|
|
|
|
|
1922
|
|
|
|
|
|
|
|
1923
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/Message.xsi' */ |
1924
|
|
|
|
|
|
|
|
1925
|
|
|
|
|
|
|
|
1926
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/MessageIterator.xsi' from 'Fast.xs' */ |
1927
|
|
|
|
|
|
|
|
1928
|
|
|
|
|
|
|
|
1929
|
|
|
|
|
|
|
|
1930
|
110
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__MessageIterator_next) { xs::throw_guard(cv, [=]() |
1931
|
|
|
|
|
|
|
{ |
1932
|
55
|
|
|
|
|
|
dVAR; dXSARGS; |
1933
|
55
|
50
|
|
|
|
|
if (items != 1) |
1934
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1935
|
|
|
|
|
|
|
{ |
1936
|
110
|
|
|
|
|
|
MessageSP RETVAL; |
1937
|
55
|
50
|
|
|
|
|
XSMessageIterator* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
; |
1939
|
|
|
|
|
|
|
#line 5 "./xsi/MessageIterator.xsi" |
1940
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1941
|
|
|
|
|
|
|
RETVAL = THIS->next(); |
1942
|
|
|
|
|
|
|
#line 1943 "Fast_xsgen.cc" |
1943
|
|
|
|
|
|
|
{ |
1944
|
|
|
|
|
|
|
SV * RETVALSV; |
1945
|
55
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1946
|
55
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1947
|
55
|
|
|
|
|
|
ST(0) = RETVALSV; |
1948
|
|
|
|
|
|
|
} |
1949
|
|
|
|
|
|
|
} |
1950
|
55
|
|
|
|
|
|
XSRETURN(1); |
1951
|
55
|
50
|
|
|
|
|
}); } |
1952
|
|
|
|
|
|
|
|
1953
|
|
|
|
|
|
|
|
1954
|
|
|
|
|
|
|
|
1955
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Protocol__WebSocket__Fast__MessageIterator_get_frames) { xs::throw_guard(cv, [=]() |
1956
|
|
|
|
|
|
|
{ |
1957
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
1958
|
3
|
50
|
|
|
|
|
if (items != 1) |
1959
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
1960
|
|
|
|
|
|
|
{ |
1961
|
|
|
|
|
|
|
XSFrameIterator * RETVAL; |
1962
|
3
|
50
|
|
|
|
|
XSMessageIterator* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1963
|
|
|
|
|
|
|
; |
1964
|
|
|
|
|
|
|
#line 9 "./xsi/MessageIterator.xsi" |
1965
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
1966
|
|
|
|
|
|
|
auto frames = THIS->get_frames(); |
1967
|
|
|
|
|
|
|
if (frames.begin() == frames.end()) XSRETURN_UNDEF; |
1968
|
|
|
|
|
|
|
RETVAL = new XSFrameIterator(frames.begin()); |
1969
|
|
|
|
|
|
|
#line 1970 "Fast_xsgen.cc" |
1970
|
|
|
|
|
|
|
{ |
1971
|
|
|
|
|
|
|
SV * RETVALSV; |
1972
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1973
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
1974
|
3
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
1975
|
|
|
|
|
|
|
} |
1976
|
|
|
|
|
|
|
} |
1977
|
3
|
|
|
|
|
|
XSRETURN(1); |
1978
|
3
|
50
|
|
|
|
|
}); } |
1979
|
|
|
|
|
|
|
|
1980
|
|
|
|
|
|
|
|
1981
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/MessageIterator.xsi' */ |
1982
|
|
|
|
|
|
|
|
1983
|
|
|
|
|
|
|
|
1984
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Error.xsi' from 'Fast.xs' */ |
1985
|
|
|
|
|
|
|
|
1986
|
|
|
|
|
|
|
|
1987
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Fast.xs' from 'xsi/Error.xsi' */ |
1988
|
|
|
|
|
|
|
|
1989
|
|
|
|
|
|
|
#ifdef __cplusplus |
1990
|
|
|
|
|
|
|
extern "C" |
1991
|
|
|
|
|
|
|
#endif |
1992
|
|
|
|
|
|
|
|
1993
|
36
|
|
|
|
|
|
XS_EXTERNAL(boot_Protocol__WebSocket__Fast) { xs::throw_guard(cv, [=]() mutable |
1994
|
|
|
|
|
|
|
{ |
1995
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
1996
|
|
|
|
|
|
|
dVAR; dXSARGS; |
1997
|
|
|
|
|
|
|
#else |
1998
|
18
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
50
|
|
|
|
|
|
1999
|
|
|
|
|
|
|
#endif |
2000
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
2001
|
|
|
|
|
|
|
char* file = __FILE__; |
2002
|
|
|
|
|
|
|
#else |
2003
|
18
|
|
|
|
|
|
const char* file = __FILE__; |
2004
|
|
|
|
|
|
|
#endif |
2005
|
|
|
|
|
|
|
|
2006
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
2007
|
|
|
|
|
|
|
|
2008
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
2009
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
2010
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
2011
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
2012
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
2013
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
2014
|
|
|
|
|
|
|
# endif |
2015
|
|
|
|
|
|
|
#endif |
2016
|
|
|
|
|
|
|
|
2017
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::configure", XS_Protocol__WebSocket__Fast__Parser_configure); |
2018
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::max_frame_size", XS_Protocol__WebSocket__Fast__Parser_max_frame_size); |
2019
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::max_message_size", XS_Protocol__WebSocket__Fast__Parser_max_message_size); |
2020
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::max_handshake_size", XS_Protocol__WebSocket__Fast__Parser_max_handshake_size); |
2021
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::deflate_config", XS_Protocol__WebSocket__Fast__Parser_deflate_config); |
2022
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::effective_deflate_config", XS_Protocol__WebSocket__Fast__Parser_effective_deflate_config); |
2023
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::established", XS_Protocol__WebSocket__Fast__Parser_established); |
2024
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::recv_closed", XS_Protocol__WebSocket__Fast__Parser_recv_closed); |
2025
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::send_closed", XS_Protocol__WebSocket__Fast__Parser_send_closed); |
2026
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::is_deflate_active", XS_Protocol__WebSocket__Fast__Parser_is_deflate_active); |
2027
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::get_frames", XS_Protocol__WebSocket__Fast__Parser_get_frames); |
2028
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::get_messages", XS_Protocol__WebSocket__Fast__Parser_get_messages); |
2029
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::start_message", XS_Protocol__WebSocket__Fast__Parser_start_message); |
2030
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::send_control", XS_Protocol__WebSocket__Fast__Parser_send_control); |
2031
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::send_ping", XS_Protocol__WebSocket__Fast__Parser_send_ping); |
2032
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::send_pong", XS_Protocol__WebSocket__Fast__Parser_send_pong); |
2033
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::send_close", XS_Protocol__WebSocket__Fast__Parser_send_close); |
2034
|
18
|
|
|
|
|
|
cv = newXS_deffile("Protocol::WebSocket::Fast::Parser::send_message", XS_Protocol__WebSocket__Fast__Parser_send_message); |
2035
|
18
|
|
|
|
|
|
XSANY.any_i32 = 0; |
2036
|
18
|
|
|
|
|
|
cv = newXS_deffile("Protocol::WebSocket::Fast::Parser::send_message_multiframe", XS_Protocol__WebSocket__Fast__Parser_send_message); |
2037
|
18
|
|
|
|
|
|
XSANY.any_i32 = 1; |
2038
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::reset", XS_Protocol__WebSocket__Fast__Parser_reset); |
2039
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::suggested_close_code", XS_Protocol__WebSocket__Fast__Parser_suggested_close_code); |
2040
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Parser::no_deflate", XS_Protocol__WebSocket__Fast__Parser_no_deflate); |
2041
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::new", XS_Protocol__WebSocket__Fast__ServerParser_new); |
2042
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::accept_parsed", XS_Protocol__WebSocket__Fast__ServerParser_accept_parsed); |
2043
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::accepted", XS_Protocol__WebSocket__Fast__ServerParser_accepted); |
2044
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::accept", XS_Protocol__WebSocket__Fast__ServerParser_accept); |
2045
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::accept_error", XS_Protocol__WebSocket__Fast__ServerParser_accept_error); |
2046
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ServerParser::accept_response", XS_Protocol__WebSocket__Fast__ServerParser_accept_response); |
2047
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ClientParser::new", XS_Protocol__WebSocket__Fast__ClientParser_new); |
2048
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ClientParser::connect_request", XS_Protocol__WebSocket__Fast__ClientParser_connect_request); |
2049
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ClientParser::connect", XS_Protocol__WebSocket__Fast__ClientParser_connect); |
2050
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::new", XS_Protocol__WebSocket__Fast__ConnectRequest_new); |
2051
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::ws_key", XS_Protocol__WebSocket__Fast__ConnectRequest_ws_key); |
2052
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::ws_version", XS_Protocol__WebSocket__Fast__ConnectRequest_ws_version); |
2053
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::ws_extensions", XS_Protocol__WebSocket__Fast__ConnectRequest_ws_extensions); |
2054
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::ws_protocol", XS_Protocol__WebSocket__Fast__ConnectRequest_ws_protocol); |
2055
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::ws_version_supported", XS_Protocol__WebSocket__Fast__ConnectRequest_ws_version_supported); |
2056
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectRequest::error", XS_Protocol__WebSocket__Fast__ConnectRequest_error); |
2057
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::new", XS_Protocol__WebSocket__Fast__ConnectResponse_new); |
2058
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::ws_accept_key", XS_Protocol__WebSocket__Fast__ConnectResponse_ws_accept_key); |
2059
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::ws_version", XS_Protocol__WebSocket__Fast__ConnectResponse_ws_version); |
2060
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::ws_extensions", XS_Protocol__WebSocket__Fast__ConnectResponse_ws_extensions); |
2061
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::ws_protocol", XS_Protocol__WebSocket__Fast__ConnectResponse_ws_protocol); |
2062
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::ConnectResponse::error", XS_Protocol__WebSocket__Fast__ConnectResponse_error); |
2063
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::error", XS_Protocol__WebSocket__Fast__Frame_error); |
2064
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::opcode", XS_Protocol__WebSocket__Fast__Frame_opcode); |
2065
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::is_control", XS_Protocol__WebSocket__Fast__Frame_is_control); |
2066
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::final", XS_Protocol__WebSocket__Fast__Frame_final); |
2067
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::payload_length", XS_Protocol__WebSocket__Fast__Frame_payload_length); |
2068
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::payload", XS_Protocol__WebSocket__Fast__Frame_payload); |
2069
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::close_code", XS_Protocol__WebSocket__Fast__Frame_close_code); |
2070
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Frame::close_message", XS_Protocol__WebSocket__Fast__Frame_close_message); |
2071
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::FrameSender::send", XS_Protocol__WebSocket__Fast__FrameSender_send); |
2072
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::FrameIterator::next", XS_Protocol__WebSocket__Fast__FrameIterator_next); |
2073
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::FrameIterator::get_messages", XS_Protocol__WebSocket__Fast__FrameIterator_get_messages); |
2074
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::error", XS_Protocol__WebSocket__Fast__Message_error); |
2075
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::opcode", XS_Protocol__WebSocket__Fast__Message_opcode); |
2076
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::is_control", XS_Protocol__WebSocket__Fast__Message_is_control); |
2077
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::payload_length", XS_Protocol__WebSocket__Fast__Message_payload_length); |
2078
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::payload", XS_Protocol__WebSocket__Fast__Message_payload); |
2079
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::close_code", XS_Protocol__WebSocket__Fast__Message_close_code); |
2080
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::close_message", XS_Protocol__WebSocket__Fast__Message_close_message); |
2081
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::Message::frame_count", XS_Protocol__WebSocket__Fast__Message_frame_count); |
2082
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::MessageIterator::next", XS_Protocol__WebSocket__Fast__MessageIterator_next); |
2083
|
18
|
|
|
|
|
|
newXS_deffile("Protocol::WebSocket::Fast::MessageIterator::get_frames", XS_Protocol__WebSocket__Fast__MessageIterator_get_frames); |
2084
|
|
|
|
|
|
|
|
2085
|
|
|
|
|
|
|
/* Initialisation Section */ |
2086
|
|
|
|
|
|
|
|
2087
|
|
|
|
|
|
|
#line 24 "Fast.xs" |
2088
|
|
|
|
|
|
|
{ |
2089
|
|
|
|
|
|
|
Stash me("Protocol::WebSocket::Fast"); |
2090
|
|
|
|
|
|
|
create_constants(me, { |
2091
|
|
|
|
|
|
|
{"OPCODE_CONTINUE", (int)Opcode::CONTINUE}, |
2092
|
|
|
|
|
|
|
{"OPCODE_TEXT", (int)Opcode::TEXT }, |
2093
|
|
|
|
|
|
|
{"OPCODE_BINARY", (int)Opcode::BINARY }, |
2094
|
|
|
|
|
|
|
{"OPCODE_CLOSE", (int)Opcode::CLOSE }, |
2095
|
|
|
|
|
|
|
{"OPCODE_PING", (int)Opcode::PING }, |
2096
|
|
|
|
|
|
|
{"OPCODE_PONG", (int)Opcode::PONG }, |
2097
|
|
|
|
|
|
|
|
2098
|
|
|
|
|
|
|
{"CLOSE_DONE", (int)CloseCode::DONE }, |
2099
|
|
|
|
|
|
|
{"CLOSE_AWAY", (int)CloseCode::AWAY }, |
2100
|
|
|
|
|
|
|
{"CLOSE_PROTOCOL_ERROR", (int)CloseCode::PROTOCOL_ERROR }, |
2101
|
|
|
|
|
|
|
{"CLOSE_INVALID_DATA", (int)CloseCode::INVALID_DATA }, |
2102
|
|
|
|
|
|
|
{"CLOSE_UNKNOWN", (int)CloseCode::UNKNOWN }, |
2103
|
|
|
|
|
|
|
{"CLOSE_ABNORMALLY", (int)CloseCode::ABNORMALLY }, |
2104
|
|
|
|
|
|
|
{"CLOSE_INVALID_TEXT", (int)CloseCode::INVALID_TEXT }, |
2105
|
|
|
|
|
|
|
{"CLOSE_BAD_REQUEST", (int)CloseCode::BAD_REQUEST }, |
2106
|
|
|
|
|
|
|
{"CLOSE_MAX_SIZE", (int)CloseCode::MAX_SIZE }, |
2107
|
|
|
|
|
|
|
{"CLOSE_EXTENSION_NEEDED", (int)CloseCode::EXTENSION_NEEDED}, |
2108
|
|
|
|
|
|
|
{"CLOSE_INTERNAL_ERROR", (int)CloseCode::INTERNAL_ERROR }, |
2109
|
|
|
|
|
|
|
{"CLOSE_TLS", (int)CloseCode::TLS } |
2110
|
|
|
|
|
|
|
}); |
2111
|
|
|
|
|
|
|
autoexport(me); |
2112
|
|
|
|
|
|
|
|
2113
|
|
|
|
|
|
|
auto err = panda::protocol::websocket::DeflateExt::bootstrap(); |
2114
|
|
|
|
|
|
|
if (err) throw *err; |
2115
|
|
|
|
|
|
|
} |
2116
|
|
|
|
|
|
|
|
2117
|
|
|
|
|
|
|
#line 4 "./xsi/ServerParser.xsi" |
2118
|
|
|
|
|
|
|
{ |
2119
|
|
|
|
|
|
|
Stash("Protocol::WebSocket::Fast::ServerParser").inherit("Protocol::WebSocket::Fast::Parser"); |
2120
|
|
|
|
|
|
|
} |
2121
|
|
|
|
|
|
|
|
2122
|
|
|
|
|
|
|
#line 4 "./xsi/ClientParser.xsi" |
2123
|
|
|
|
|
|
|
{ |
2124
|
|
|
|
|
|
|
Stash("Protocol::WebSocket::Fast::ClientParser").inherit("Protocol::WebSocket::Fast::Parser"); |
2125
|
|
|
|
|
|
|
} |
2126
|
|
|
|
|
|
|
|
2127
|
|
|
|
|
|
|
#line 4 "./xsi/ConnectRequest.xsi" |
2128
|
|
|
|
|
|
|
{ |
2129
|
|
|
|
|
|
|
Stash("Protocol::WebSocket::Fast::ConnectRequest").inherit("Protocol::HTTP::Request"); |
2130
|
|
|
|
|
|
|
} |
2131
|
|
|
|
|
|
|
|
2132
|
|
|
|
|
|
|
#line 4 "./xsi/ConnectResponse.xsi" |
2133
|
|
|
|
|
|
|
{ |
2134
|
|
|
|
|
|
|
Stash("Protocol::WebSocket::Fast::ConnectResponse").inherit("Protocol::HTTP::Response"); |
2135
|
|
|
|
|
|
|
} |
2136
|
|
|
|
|
|
|
|
2137
|
|
|
|
|
|
|
#line 4 "./xsi/Error.xsi" |
2138
|
|
|
|
|
|
|
{ |
2139
|
|
|
|
|
|
|
Stash s("Protocol::WebSocket::Fast");
|
2140
|
|
|
|
|
|
|
|
2141
|
|
|
|
|
|
|
Stash ecstash("Protocol::WebSocket::Fast::Error", GV_ADD);
|
2142
|
|
|
|
|
|
|
xs::exp::create_constants(ecstash, {
|
2143
|
|
|
|
|
|
|
{"garbage_after_connect", xs::out(make_error_code(errc::garbage_after_connect))},
|
2144
|
|
|
|
|
|
|
{"unsupported_version", xs::out(make_error_code(errc::unsupported_version))},
|
2145
|
|
|
|
|
|
|
{"response_code_101", xs::out(make_error_code(errc::response_code_101))},
|
2146
|
|
|
|
|
|
|
{"connection_mustbe_upgrade", xs::out(make_error_code(errc::connection_mustbe_upgrade))},
|
2147
|
|
|
|
|
|
|
{"upgrade_mustbe_websocket", xs::out(make_error_code(errc::upgrade_mustbe_websocket))},
|
2148
|
|
|
|
|
|
|
{"sec_accept_missing", xs::out(make_error_code(errc::sec_accept_missing))},
|
2149
|
|
|
|
|
|
|
{"method_mustbe_get", xs::out(make_error_code(errc::method_mustbe_get))},
|
2150
|
|
|
|
|
|
|
{"http_1_1_required", xs::out(make_error_code(errc::http_1_1_required))},
|
2151
|
|
|
|
|
|
|
{"body_prohibited", xs::out(make_error_code(errc::body_prohibited))},
|
2152
|
|
|
|
|
|
|
{"invalid_opcode", xs::out(make_error_code(errc::invalid_opcode))},
|
2153
|
|
|
|
|
|
|
{"control_fragmented", xs::out(make_error_code(errc::control_fragmented))},
|
2154
|
|
|
|
|
|
|
{"control_payload_too_big", xs::out(make_error_code(errc::control_payload_too_big))},
|
2155
|
|
|
|
|
|
|
{"not_masked", xs::out(make_error_code(errc::not_masked))},
|
2156
|
|
|
|
|
|
|
{"max_frame_size", xs::out(make_error_code(errc::max_frame_size))},
|
2157
|
|
|
|
|
|
|
{"close_frame_invalid_data", xs::out(make_error_code(errc::close_frame_invalid_data))},
|
2158
|
|
|
|
|
|
|
{"initial_continue", xs::out(make_error_code(errc::initial_continue))},
|
2159
|
|
|
|
|
|
|
{"fragment_no_continue", xs::out(make_error_code(errc::fragment_no_continue))},
|
2160
|
|
|
|
|
|
|
{"max_message_size", xs::out(make_error_code(errc::max_message_size))},
|
2161
|
|
|
|
|
|
|
{"deflate_negotiation_failed", xs::out(make_error_code(errc::deflate_negotiation_failed))},
|
2162
|
|
|
|
|
|
|
{"control_frame_compression", xs::out(make_error_code(errc::control_frame_compression))},
|
2163
|
|
|
|
|
|
|
{"inflate_error", xs::out(make_error_code(errc::inflate_error))},
|
2164
|
|
|
|
|
|
|
{"unexpected_rsv", xs::out(make_error_code(errc::unexpected_rsv))},
|
2165
|
|
|
|
|
|
|
{"invalid_utf8", xs::out(make_error_code(errc::invalid_utf8))},
|
2166
|
|
|
|
|
|
|
});
|
2167
|
|
|
|
|
|
|
xs::exp::autoexport(ecstash);
|
2168
|
|
|
|
|
|
|
|
2169
|
|
|
|
|
|
|
s.add_const_sub("error_category", xs::out(&error_category));
|
2170
|
|
|
|
|
|
|
} |
2171
|
|
|
|
|
|
|
|
2172
|
|
|
|
|
|
|
#line 2173 "Fast_xsgen.cc" |
2173
|
|
|
|
|
|
|
|
2174
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
2175
|
|
|
|
|
|
|
|
2176
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
2177
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
2178
|
|
|
|
|
|
|
if (PL_unitcheckav) |
2179
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
2180
|
|
|
|
|
|
|
# endif |
2181
|
|
|
|
|
|
|
XSRETURN_YES; |
2182
|
|
|
|
|
|
|
#else |
2183
|
18
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
2184
|
|
|
|
|
|
|
#endif |
2185
|
108
|
50
|
|
|
|
|
}); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
2186
|
|
|
|
|
|
|
|