Mercurial > hg > beaglert
view include/UdpClient.h @ 108:3068421c0737 ultra-staging
Merged default into ultra-staging
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 18 Aug 2015 00:35:15 +0100 |
parents | 6907e2177eb8 f3251851c718 |
children | da1c61aa97ea |
line wrap: on
line source
/* * udpClient.h * * Created on: 19 May 2015 * Author: giulio moro */ #ifndef UDPCLIENT_H_ #define UDPCLIENT_H_ #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> class UdpClient{ private: int port; int enabled; int outSocket; bool isSetPort; bool isSetServer; struct sockaddr_in destinationServer; public: UdpClient(); UdpClient(int aPort, const char* aServerName); ~UdpClient(); void setPort(int aPort); void setServer(const char* aServerName); int send(void* message, int size); }; #endif /* UDPCLIENT_H_ */