diff include/client.h @ 24:ad5cd8dd99b3 bbb_network

UDP communication in place, pre-alpha
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 08 May 2015 11:12:13 +0100
parents
children 4255ecbb9bec f3251851c718
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/client.h	Fri May 08 11:12:13 2015 +0100
@@ -0,0 +1,22 @@
+/* UDP client in the internet domain */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+struct networkData{
+	int *counter;
+	float *variables[16];
+	int numVariables;
+};
+
+void error(const char *);
+int setupSockets(int receivePort, int transmitPort, char const*serverName);
+int sendMessage(networkData message);
+int receiveMessage(networkData message);
+void closeSockets();