summaryrefslogtreecommitdiffstats
path: root/include/udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/udp.h')
-rwxr-xr-xinclude/udp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/udp.h b/include/udp.h
new file mode 100755
index 0000000..358e585
--- /dev/null
+++ b/include/udp.h
@@ -0,0 +1,16 @@
+#ifndef DEVICE_UDP_H
+#define DEVICE_UDP_H
+
+#include <ESP8266WiFi.h>
+#include <WiFiUdp.h>
+
+static const int com_port = 6996;
+IPAddress ip; /* Daemon IP */
+WiFiUDP Udp;
+
+extern void discover_client(const int port);
+extern void udp_init_packet(IPAddress ip, const int port);
+extern void udp_push(const void * const data, const size_t size);
+extern int udp_flush(void);
+
+#endif /* DEVICE_UDP_H */ \ No newline at end of file