Keystone Developer / X-NUCLEO-SARA-N200

Dependents:   sara-n200-hello-mqtt-sn

Files at this revision

API Documentation at this revision

Comitter:
KeystoneElectronic
Date:
Tue Aug 21 16:38:20 2018 +0200
Parent:
0:87f4169aba8e
Child:
2:9b9276791c59
Commit message:
Move udp_interface here

Changed in this revision

udp_interface.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/udp_interface.h	Tue Aug 21 16:38:20 2018 +0200
@@ -0,0 +1,27 @@
+/*
+ * udp_interface.h
+ *
+ *  Created on: Aug 15, 2018
+ *      Author: janus
+ */
+
+#ifndef SRC_UDP_INTERFACE_H_
+#define SRC_UDP_INTERFACE_H_
+#include <stdint.h>
+
+class UDPinterface
+{
+public:
+	UDPinterface(){};
+	virtual ~UDPinterface(){};
+
+	virtual int connect(char *hostname, int port) = 0;
+	virtual bool disconnect(int id) = 0;
+
+	virtual int read(int sock_id, char *host, int *port, uint8_t *buff, int len, int timeout) = 0;
+	virtual int write(int sock_id, char *host, int port, uint8_t *buff, int len, int timeout) = 0;
+};
+
+
+
+#endif /* SRC_UDP_INTERFACE_H_ */