line |
true |
false |
branch |
4
|
31 |
0 |
void Parser::configure (Parser::Config config) |
13
|
102 |
0 |
auto deflate_cfg = THIS->deflate_config(); |
|
98 |
4 |
auto deflate_cfg = THIS->deflate_config(); |
14
|
98 |
4 |
if (deflate_cfg) { |
15
|
98 |
0 |
RETVAL = xs::out(deflate_cfg.value()); |
|
98 |
0 |
RETVAL = xs::out(deflate_cfg.value()); |
21
|
4 |
0 |
auto deflate_cfg = THIS->effective_deflate_config(); |
|
4 |
0 |
auto deflate_cfg = THIS->effective_deflate_config(); |
22
|
4 |
0 |
if (deflate_cfg) { |
23
|
4 |
0 |
RETVAL = xs::out(deflate_cfg.value()); |
|
4 |
0 |
RETVAL = xs::out(deflate_cfg.value()); |
37
|
72399 |
0 |
auto frames = buf ? THIS->get_frames(buf) : THIS->get_frames(); |
|
72395 |
4 |
auto frames = buf ? THIS->get_frames(buf) : THIS->get_frames(); |
|
0 |
0 |
auto frames = buf ? THIS->get_frames(buf) : THIS->get_frames(); |
38
|
72395 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
0 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
58 |
72337 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
58 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
58 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
63 |
58 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
63 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
0 |
63 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
0 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
63 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
63 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
|
63 |
0 |
if (GIMME_V == G_ARRAY) for (auto frame : frames) mXPUSHs(xs::out(frame).detach()); |
40
|
72337 |
0 |
if (frames.begin() == frames.end()) XSRETURN_UNDEF; |
|
72337 |
0 |
if (frames.begin() == frames.end()) XSRETURN_UNDEF; |
|
72291 |
46 |
if (frames.begin() == frames.end()) XSRETURN_UNDEF; |
41
|
46 |
0 |
auto itsv = xs::out(new XSFrameIterator(frames.begin())); |
|
46 |
0 |
auto itsv = xs::out(new XSFrameIterator(frames.begin())); |
|
46 |
0 |
auto itsv = xs::out(new XSFrameIterator(frames.begin())); |
|
46 |
0 |
auto itsv = xs::out(new XSFrameIterator(frames.begin())); |
42
|
46 |
0 |
mPUSHs(itsv.detach()); |
47
|
3661 |
1 |
auto messages = buf ? THIS->get_messages(buf) : THIS->get_messages(); |
|
3660 |
1 |
auto messages = buf ? THIS->get_messages(buf) : THIS->get_messages(); |
|
1 |
0 |
auto messages = buf ? THIS->get_messages(buf) : THIS->get_messages(); |
48
|
3661 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
0 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
146 |
3515 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
146 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
146 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
154 |
146 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
154 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
0 |
154 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
0 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
154 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
154 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
|
154 |
0 |
if (GIMME_V == G_ARRAY) for (auto message : messages) mXPUSHs(xs::out(message).detach()); |
50
|
3515 |
0 |
if (messages.begin() == messages.end()) XSRETURN_UNDEF; |
|
3515 |
0 |
if (messages.begin() == messages.end()) XSRETURN_UNDEF; |
|
3483 |
32 |
if (messages.begin() == messages.end()) XSRETURN_UNDEF; |
51
|
32 |
0 |
auto itsv = xs::out(new XSMessageIterator(messages.begin())); |
|
32 |
0 |
auto itsv = xs::out(new XSMessageIterator(messages.begin())); |
|
32 |
0 |
auto itsv = xs::out(new XSMessageIterator(messages.begin())); |
|
32 |
0 |
auto itsv = xs::out(new XSMessageIterator(messages.begin())); |
52
|
32 |
0 |
mPUSHs(itsv.detach()); |
61
|
48 |
50 |
auto name = xs::in(ST(i)); |
62
|
48 |
0 |
if (!name.length()) continue; |
63
|
0 |
48 |
auto val = ST(i+1); |
66
|
32 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
32 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
32 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
32 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
32 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
32 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
32 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
32 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
1 |
31 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
1 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
|
0 |
0 |
case 'o': if (name == "opcode") opcode = (Opcode)SvIV(val); break; |
67
|
9 |
0 |
} |
|
9 |
0 |
} |
|
9 |
0 |
} |
|
0 |
0 |
} |
71
|
48 |
2 |
} |
|
48 |
0 |
} |
74
|
18 |
0 |
auto range = THIS->send_control((Opcode)opcode, payload); |
|
18 |
0 |
auto range = THIS->send_control((Opcode)opcode, payload); |
75
|
18 |
0 |
RETVAL = strings_to_sv(range); |
79
|
6 |
0 |
auto range = THIS->send_ping(payload); |
|
6 |
0 |
auto range = THIS->send_ping(payload); |
80
|
6 |
0 |
RETVAL = strings_to_sv(range); |
84
|
5 |
0 |
auto range = THIS->send_pong(payload); |
|
5 |
0 |
auto range = THIS->send_pong(payload); |
85
|
5 |
0 |
RETVAL = strings_to_sv(range); |
89
|
3 |
1 |
if (code) { |
90
|
0 |
3 |
auto range = THIS->send_close((uint16_t)SvUV(code), message); |
|
3 |
0 |
auto range = THIS->send_close((uint16_t)SvUV(code), message); |
|
3 |
0 |
auto range = THIS->send_close((uint16_t)SvUV(code), message); |
91
|
3 |
0 |
RETVAL = strings_to_sv(range); |
93
|
1 |
0 |
else RETVAL = xs::out(THIS->send_close()); |
|
1 |
0 |
else RETVAL = xs::out(THIS->send_close()); |
|
1 |
0 |
else RETVAL = xs::out(THIS->send_close()); |
99
|
111 |
0 |
Sv payload_sv; |
100
|
121 |
111 |
for (I32 i = 1; i < items - 1; i += 2) { |
101
|
121 |
0 |
auto name = xs::in(ST(i)); |
102
|
0 |
121 |
if (!name.length()) continue; |
105
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
6 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
6 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
6 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
6 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
6 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
3 |
3 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
3 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
|
0 |
0 |
case 'd': if (name == "deflate" && SvOK(val)) builder.deflate(SvTRUE(val)); break; |
106
|
4 |
0 |
case 'o': if (name == "opcode") builder.opcode((Opcode)SvIV(val)); break; |
|
4 |
0 |
case 'o': if (name == "opcode") builder.opcode((Opcode)SvIV(val)); break; |
|
4 |
0 |
case 'o': if (name == "opcode") builder.opcode((Opcode)SvIV(val)); break; |
|
0 |
0 |
case 'o': if (name == "opcode") builder.opcode((Opcode)SvIV(val)); break; |
107
|
111 |
0 |
case 'p': if (name == "payload") payload_sv = val; break; |
|
111 |
0 |
case 'p': if (name == "payload") payload_sv = val; break; |
|
111 |
0 |
case 'p': if (name == "payload") payload_sv = val; break; |
111
|
107 |
4 |
if (ix == 0) { // send_message() |
112
|
107 |
0 |
if (payload_sv.is_array_ref()) { |
|
1 |
106 |
if (payload_sv.is_array_ref()) { |
113
|
1 |
0 |
Array payload(payload_sv); |
115
|
1 |
0 |
av_to_vstring(payload, list); |
116
|
1 |
0 |
auto range = builder.send(list.begin(), list.end()); |
117
|
1 |
0 |
RETVAL = strings_to_sv(range); |
120
|
106 |
0 |
auto payload = Simple(payload_sv).as_string(); |
|
106 |
0 |
auto payload = Simple(payload_sv).as_string(); |
121
|
106 |
0 |
auto range = builder.send(payload); |
122
|
106 |
0 |
RETVAL = strings_to_sv(range); |
126
|
4 |
0 |
Array payloads(payload_sv); |
127
|
0 |
4 |
if (!payloads) throw Error("invalid argument (payload must point to array)"); |
130
|
4 |
0 |
for (const auto& payload : payloads) { |
|
4 |
0 |
for (const auto& payload : payloads) { |
|
12 |
4 |
for (const auto& payload : payloads) { |
|
12 |
0 |
for (const auto& payload : payloads) { |
131
|
0 |
12 |
if (!payload.defined()) continue; |
132
|
12 |
0 |
std::vector tmp; |
133
|
12 |
0 |
tmp.push_back(xs::in(payload)); |
|
12 |
0 |
tmp.push_back(xs::in(payload)); |
134
|
12 |
0 |
cont.push_back(std::move(tmp)); |
137
|
4 |
0 |
auto range = builder.send(cont.begin(), cont.end()); |
138
|
4 |
0 |
RETVAL = strings_to_sv(range); |