Commit d95aa8d 1 parent 46ffea1 commit d95aa8d Copy full SHA for d95aa8d
File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ namespace glz
508
508
while (true ) {
509
509
co_await co_receive_buffer (socket, request);
510
510
registry.call (request, response);
511
- if (not response .header .notify ()) {
511
+ if (not request .header .notify ()) {
512
512
co_await co_send_buffer (socket, response);
513
513
}
514
514
}
Original file line number Diff line number Diff line change @@ -47,30 +47,30 @@ namespace glz::repe
47
47
void notify (bool enable)
48
48
{
49
49
if (enable) {
50
- action = static_cast <repe::action>(uint32_t (action) | uint32_t (action::notify));
50
+ action = static_cast <repe::action>(uint32_t (action) | uint32_t (repe:: action::notify));
51
51
}
52
52
else {
53
- action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (action::notify));
53
+ action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (repe:: action::notify));
54
54
}
55
55
}
56
56
57
57
void read (bool enable)
58
58
{
59
59
if (enable) {
60
- action = static_cast <repe::action>(uint32_t (action) | uint32_t (action::read ));
60
+ action = static_cast <repe::action>(uint32_t (action) | uint32_t (repe:: action::read ));
61
61
}
62
62
else {
63
- action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (action::read));
63
+ action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (repe:: action::read));
64
64
}
65
65
}
66
66
67
67
void write (bool enable)
68
68
{
69
69
if (enable) {
70
- action = static_cast <repe::action>(uint32_t (action) | uint32_t (action::write ));
70
+ action = static_cast <repe::action>(uint32_t (action) | uint32_t (repe:: action::write ));
71
71
}
72
72
else {
73
- action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (action::write));
73
+ action = static_cast <repe::action>(uint32_t (action) & ~uint32_t (repe:: action::write));
74
74
}
75
75
}
76
76
};
Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ struct example_functions_t
63
63
};
64
64
};
65
65
66
+ suite header_tests = [] {
67
+ " header" _test = [] {
68
+ glz::repe::header h{.action = glz::repe::action::read };
69
+ expect (not h.notify ());
70
+ expect (h.read ());
71
+ };
72
+ };
73
+
66
74
suite structs_of_functions = [] {
67
75
" structs_of_functions" _test = [] {
68
76
repe::registry server{};
You can’t perform that action at this time.
0 commit comments