comparison 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
comparison
equal deleted inserted replaced
23:182ae9367104 24:ad5cd8dd99b3
1 /* UDP client in the internet domain */
2 #include <sys/types.h>
3 #include <sys/socket.h>
4 #include <netinet/in.h>
5 #include <arpa/inet.h>
6 #include <netdb.h>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <unistd.h>
10 #include <string.h>
11
12 struct networkData{
13 int *counter;
14 float *variables[16];
15 int numVariables;
16 };
17
18 void error(const char *);
19 int setupSockets(int receivePort, int transmitPort, char const*serverName);
20 int sendMessage(networkData message);
21 int receiveMessage(networkData message);
22 void closeSockets();