Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: util/SmartRestSocket.h
- Revision:
- 106:c61f0d62b625
- Parent:
- 99:e369fc75c000
- Child:
- 116:4eb3c7e945cf
--- a/util/SmartRestSocket.h Fri May 08 14:50:43 2015 +0000 +++ b/util/SmartRestSocket.h Mon May 11 18:10:44 2015 +0000 @@ -6,16 +6,17 @@ class SmartRestSocket : private TCPSocketConnection { public: - SmartRestSocket(): TCPSocketConnection() {} + SmartRestSocket(): TCPSocketConnection(), timeout(-1) {} virtual ~SmartRestSocket() {} int sendOnly(char *buf, int size); int sendAndReceive(char *buf, int size, int maxSize); - void set_blocking(bool blocking, unsigned int timeout = 3000) { // timeout in milliseconds - Socket::set_blocking(blocking, timeout); + void setBlocking(int _timeout = -1) { // timeout in milliseconds + timeout = _timeout; } private: int connect(); static char cachedIP[16]; + int timeout; Mutex ipLock; };