increased chunk size

Dependencies:   HTTPClient-SSL

Fork of MTS-Socket by MultiTech

Revision:
14:7643ed024fe8
Parent:
12:9efe3cc3cb6c
Child:
15:8b5fbb926688
--- a/Test/TestTCPSocketConnection.h	Mon Jun 23 14:33:39 2014 +0000
+++ b/Test/TestTCPSocketConnection.h	Wed Jul 23 16:01:16 2014 +0000
@@ -40,8 +40,8 @@
                     "q       quit"
                     ">:";
 
-const char TCP_TEST_SERVER[] = "204.26.122.5";
-const int TCP_TEST_PORT = 7000;
+const char TCP_TEST_SERVER[] = "";
+const int TCP_TEST_PORT = -1;
 
 TestTCPSocketConnection::TestTCPSocketConnection() : TestCollection("TestTCPSocketConnection") {}
 
@@ -131,7 +131,10 @@
             result.append(buffer, bytesRead);
         }
         logInfo("Total Bytes Read: %d", result.size());
-    } while(tmr.read() <= 5);
+        if(result.find(MENU_LINE1) != std::string::npos) {
+            break;
+        }
+    } while(tmr.read() <= 40);
     
     wait(5);
 
@@ -165,7 +168,10 @@
             result.append(buffer, bytesRead);
         }
         logInfo("Total Bytes Read: %d", result.size());
-    } while(tmr.read() <= 3);
+        if(result.find("how many") != std::string::npos) {
+            break;
+        }
+    } while(tmr.read() <= 40);
 
     logInfo("Received: [%d] [%s]", result.size(), result.c_str());
 
@@ -196,7 +202,10 @@
             result.append(buffer, bytesRead);
         }
         logInfo("Total Bytes Read: %d", result.size());
-    } while(tmr.read() <= 8);
+        if(result.size() >= 1645) {
+            break;
+        }
+    } while(tmr.read() <= 40);
 
     logInfo("Received Data: [%d] [%s]", result.size(), result.c_str());
 
@@ -249,6 +258,7 @@
 
     result.clear();
     sock->close();
+    radio->disconnect();
     return true;
 }