Mercurial > hg > beaglert
comparison include/UdpClient.h @ 217:c42a6b4dc2d4 mergingClockSync
Recovered some files from ClockSync
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 13 Feb 2016 04:09:12 +0000 |
parents | f3251851c718 |
children | 6599a9978ac4 |
comparison
equal
deleted
inserted
replaced
216:869f5e703844 | 217:c42a6b4dc2d4 |
---|---|
21 class UdpClient{ | 21 class UdpClient{ |
22 private: | 22 private: |
23 int port; | 23 int port; |
24 int enabled; | 24 int enabled; |
25 int outSocket; | 25 int outSocket; |
26 struct timeval stTimeOut; | |
27 fd_set stWriteFDS; | |
26 bool isSetPort; | 28 bool isSetPort; |
27 bool isSetServer; | 29 bool isSetServer; |
28 struct sockaddr_in destinationServer; | 30 struct sockaddr_in destinationServer; |
29 public: | 31 public: |
30 UdpClient(); | 32 UdpClient(); |
31 UdpClient(int aPort, const char* aServerName); | 33 UdpClient(int aPort, const char* aServerName); |
32 ~UdpClient(); | 34 ~UdpClient(); |
33 void setPort(int aPort); | 35 void setPort(int aPort); |
34 void setServer(const char* aServerName); | 36 void setServer(const char* aServerName); |
35 int send(void* message, int size); | 37 int send(void* message, int size); |
38 int write(const char* remoteHostname, int remotePortNumber, void* sourceBuffer, int numBytesToWrite); | |
39 int waitUntilReady(bool readyForReading, int timeoutMsecs); | |
36 }; | 40 }; |
37 | 41 |
38 | 42 |
39 | 43 |
40 #endif /* UDPCLIENT_H_ */ | 44 #endif /* UDPCLIENT_H_ */ |