comparison include/UdpClient.h @ 70:f3251851c718

Brought UdpClient files over from ultra-staging branch (with include fix), and updated Makefile accordingly
author andrewm
date Fri, 17 Jul 2015 17:50:54 +0100
parents
children 3068421c0737 c42a6b4dc2d4
comparison
equal deleted inserted replaced
69:272154649c46 70:f3251851c718
1 /*
2 * udpClient.h
3 *
4 * Created on: 19 May 2015
5 * Author: giulio moro
6 */
7
8 #ifndef UDPCLIENT_H_
9 #define UDPCLIENT_H_
10
11 #include <sys/types.h>
12 #include <sys/socket.h>
13 #include <netinet/in.h>
14 #include <arpa/inet.h>
15 #include <netdb.h>
16 #include <stdio.h>
17 #include <stdlib.h>
18 #include <unistd.h>
19 #include <string.h>
20
21 class UdpClient{
22 private:
23 int port;
24 int enabled;
25 int outSocket;
26 bool isSetPort;
27 bool isSetServer;
28 struct sockaddr_in destinationServer;
29 public:
30 UdpClient();
31 UdpClient(int aPort, const char* aServerName);
32 ~UdpClient();
33 void setPort(int aPort);
34 void setServer(const char* aServerName);
35 int send(void* message, int size);
36 };
37
38
39
40 #endif /* UDPCLIENT_H_ */