xs/main_xsgen.cc

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