Thinger.io client for boards compatible with the ARM mbed Ethernet Interface.
Dependencies: EthernetInterface ThingerClient mbed-rtos
Fork of ThingerEthernetClient by
Diff: TCPSocket.h
- Revision:
- 0:ad55e6505bbb
- Child:
- 3:a38b8921ff2c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TCPSocket.h Fri Dec 25 17:55:24 2015 +0000 @@ -0,0 +1,17 @@ +#include "TCPSocketConnection.h" + +class TCPSocket : public TCPSocketConnection +{ +public: + TCPSocket() { + set_blocking(false, _timeout); + } + + virtual ~TCPSocket() { + } + + int available() { + TimeInterval interval(10); // millisecods + return wait_readable(interval)==0 ? 1 : 0; + } +}; \ No newline at end of file