Fixed UDP Client. Allow interfacing with WebSocketClient. General improvements.
Fork of ESP8266Interface by
Diff: Socket/Socket.cpp
- Revision:
- 40:0a83315aea0a
- Parent:
- 36:e1545c6c2cb3
- Child:
- 42:3f62103a4f3c
--- a/Socket/Socket.cpp Sat May 02 04:08:30 2015 +0000 +++ b/Socket/Socket.cpp Mon May 04 12:04:54 2015 +0000 @@ -20,7 +20,7 @@ #include <cstring> //Debug is disabled by default -#if 1 +#if 0 //Enable debug #include <cstdio> #define DBG(x, ...) std::printf("[Socket : DBG]"x" [%s,%d]\r\n", ##__VA_ARGS__,__FILE__,__LINE__); @@ -35,8 +35,6 @@ #endif -extern Serial pc; - Socket::Socket() : _blocking(true), _timeout(1500) { wifi = ESP8266::getInstance(); if (wifi == NULL) @@ -50,6 +48,7 @@ } int Socket::close() { + return (wifi->close()) ? 0 : -1; }