Clean up callback_list, remove sentinel/active/tail, callbacks return bool for removal, register before send
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user