a library to use GPRS like ethernet or wifi, which makes it possible to connect to the internet with your GPRS module

Dependencies:   BufferedSerial

Dependents:   ThinkSpeak_Test roam_v1 roam_v2 finalv3

Fork of GPRSInterface by wei zou

Revision:
13:379ce1d51b88
Parent:
9:38800611a613
--- a/Socket/TCPSocketConnection.cpp	Tue Mar 10 03:11:38 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp	Fri Apr 03 15:44:04 2015 +0800
@@ -51,40 +51,17 @@
 
 int TCPSocketConnection::send(char* data, int length)
 {
-    int size = gprs->wait_writeable(_sock_fd, length);
-    if (size < 0) {
-        return -1;
-    }
-    if (size > length) {
-        size = length;
-    }
-    return gprs->send(_sock_fd, data, size);
+    return gprs->sock_send(_sock_fd, data, length);
 }
 
 int TCPSocketConnection::send_all(char* data, int length)
 {
-    return send(data,length);
+    return send(data, length);
 }
 
 int TCPSocketConnection::receive(char* data, int length)
 {
-#if 0
-    if (size < 0) {
-        return -1;
-    }
-    if(size == 0) {
-        size = gprs->wait_readable(_sock_fd, DEFAULT_TIMEOUT);
-    }
-
-    if(size > length) {
-        size = size - length;
-    } else {
-        length = size;
-        size = -1;
-    }
-#endif
-    int size = gprs->wait_readable(_sock_fd, DEFAULT_TIMEOUT);
-    return gprs->recv(_sock_fd, data, size>length?length:size);
+    return gprs->sock_recv(_sock_fd, data, length);
 }
 
 int TCPSocketConnection::receive_all(char* data, int length)