21 #include "bytebauble.h"
24 enum NYSD_message_type {
25 NYSD_MESSAGE_TYPE_BROADCAST = 0x01,
26 NYSD_MESSAGE_TYPE_RESPONSE = 0x02
31 NYSD_PROTOCOL_ALL = 0x00,
32 NYSD_PROTOCOL_TCP = 0x01,
33 NYSD_PROTOCOL_UDP = 0x02
43 NYSD_protocol protocol = NYSD_PROTOCOL_ALL;
48 NYSD_protocol protocol;
54 static std::vector<NYSD_service> services;
55 static std::mutex servicesMutex;
56 static std::atomic<bool> running;
57 static std::thread handler;
60 static void clientHandler(uint16_t port);
63 static bool sendQuery(uint16_t port, std::vector<NYSD_query> queries,
64 std::vector<NYSD_service> &responses);
66 static bool startListener(uint16_t port);
67 static bool stopListener();
69 static std::string ipv4_uintToString(uint32_t ipv4);
70 static uint32_t ipv4_stringToUint(std::string ipv4);
Definition: bytebauble.h:35