Zero-copy ethernet TX: encode directly into prepend_buffer, add info/test skills
This commit is contained in:
@@ -13,8 +13,11 @@ struct net_state {
|
||||
ipv4::ip4_addr ip;
|
||||
};
|
||||
|
||||
using encode_fn = std::function<msgpack::result<size_t>(span_writer&)>;
|
||||
using send_fn = std::function<void(encode_fn)>;
|
||||
|
||||
using net_handler = std::function<void(std::span<const uint8_t> payload,
|
||||
std::function<void(std::span<const uint8_t>)> send)>;
|
||||
send_fn send)>;
|
||||
|
||||
using net_frame_callback = std::function<bool(std::span<const uint8_t> frame)>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user