Add UDP transport with picomap port 28781, info -udp flag
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
#pragma once
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
struct net_state {
|
||||
std::array<uint8_t, 6> mac;
|
||||
std::array<uint8_t, 4> ip;
|
||||
};
|
||||
|
||||
using net_handler = std::function<std::vector<std::vector<uint8_t>>(std::span<const uint8_t> payload)>;
|
||||
|
||||
bool net_init();
|
||||
const net_state& net_get_state();
|
||||
void net_set_handler(net_handler handler);
|
||||
void net_poll();
|
||||
|
||||
Reference in New Issue
Block a user