Clean up callback_list, remove sentinel/active/tail, callbacks return bool for removal, register before send

This commit is contained in:
Ian Gulliver
2026-04-11 15:01:37 +09:00
parent 938b4b8a4c
commit 1c8c645878
5 changed files with 66 additions and 72 deletions

View File

@@ -18,11 +18,7 @@ using net_handler = std::function<void(std::span<const uint8_t> payload,
using net_frame_callback = std::function<bool(std::span<const uint8_t> frame)>;
struct frame_callback_entry {
net_frame_callback fn;
};
using frame_cb_list = callback_list<frame_callback_entry, 16>;
using frame_cb_list = callback_list<net_frame_callback, 16>;
using frame_cb_handle = frame_cb_list::node*;
bool net_init();