for testing wifi

Dependents:   ESP8266_Test_WIFI

Fork of ESP8266Interface by Steve Kim

Revision:
44:3a7b6083210b
Parent:
33:727aac1996b8
Child:
45:c180905b5b79
--- a/Socket/TCPSocketConnection.cpp	Fri May 01 18:29:38 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp	Wed Jun 03 18:21:19 2015 +0000
@@ -23,7 +23,7 @@
 using std::memcpy;
 
 //Debug is disabled by default
-#ifdef DEBUG
+#if 1
 #define DBG(x, ...)  printf("[TCPConnection : DBG]"x"\r\n", ##__VA_ARGS__);
 #define WARN(x, ...) printf("[TCPConnection: WARN]"x"\r\n", ##__VA_ARGS__);
 #define ERR(x, ...)  printf("[TCPConnection : ERR]"x"\r\n", ##__VA_ARGS__);
@@ -67,7 +67,7 @@
 int TCPSocketConnection::send(char* data, int length)
 {
     if (!_is_connected) {
-        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data untill you connect to a socket!");
+        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data until you connect to a socket!");
         return -1;
     }
     Timer tmr;
@@ -130,7 +130,7 @@
 int TCPSocketConnection::receive(char* buffer, int length)
 {
     if (!_is_connected) {
-        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data untill you connect to a socket!");
+        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data until you connect to a socket!");
         return -1;
     }
     Timer tmr;
@@ -240,5 +240,5 @@
 //        }
 //    }
 //    return readLen;
-    return 0;
+    receive(data,length);
 }