Mercurial > hg > beaglert
comparison include/UdpClient.h @ 336:6599a9978ac4 prerelease
Refactored UdpClient, changed line endings to Unix
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 05 Jun 2016 20:22:55 +0100 |
parents | c42a6b4dc2d4 |
children |
comparison
equal
deleted
inserted
replaced
335:f14dc4ac8955 | 336:6599a9978ac4 |
---|---|
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; | 26 struct timeval stTimeOut; |
27 fd_set stWriteFDS; | 27 fd_set stWriteFDS; |
28 bool isSetPort; | 28 bool isSetPort; |
29 bool isSetServer; | 29 bool isSetServer; |
30 struct sockaddr_in destinationServer; | 30 struct sockaddr_in destinationServer; |
31 public: | 31 public: |
32 UdpClient(); | 32 UdpClient(); |
34 ~UdpClient(); | 34 ~UdpClient(); |
35 void setPort(int aPort); | 35 void setPort(int aPort); |
36 void setServer(const char* aServerName); | 36 void setServer(const char* aServerName); |
37 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); | 38 int write(const char* remoteHostname, int remotePortNumber, void* sourceBuffer, int numBytesToWrite); |
39 int waitUntilReady(bool readyForReading, int timeoutMsecs); | 39 int waitUntilReady(bool readyForReading, int timeoutMsecs); |
40 int setSocketBroadcast(int broadcastEnable); | |
40 }; | 41 }; |
41 | 42 |
42 | 43 |
43 | 44 |
44 #endif /* UDPCLIENT_H_ */ | 45 #endif /* UDPCLIENT_H_ */ |