Daniele Lacamera / PicoTCP-Experimental_CDC_ECM_Branch

Fork of PicoTCP by Daniele Lacamera

Revision:
11:58acd53df75c
Parent:
5:445d2fc04784
Child:
13:c6662adea07d
--- a/Socket/TCPSocketConnection.cpp	Thu Jun 06 00:38:54 2013 +0000
+++ b/Socket/TCPSocketConnection.cpp	Thu Jun 06 07:08:58 2013 +0000
@@ -76,7 +76,7 @@
         }
     }
     
-    int n = picotcp_send(_sock_fd, data, length, 0);
+    int n = picotcp_write(_sock_fd, data, length);
     _is_connected = (picotcp_state(_sock_fd) == SOCK_CONNECTED);
     
     return n;
@@ -96,7 +96,7 @@
                 return writtenLen;
         }
         
-        int ret = picotcp_send(_sock_fd, data + writtenLen, length - writtenLen, 0);
+        int ret = picotcp_write(_sock_fd, data + writtenLen, length - writtenLen);
         if (ret > 0) {
             writtenLen += ret;
             continue;
@@ -120,7 +120,7 @@
             return -1;
     }
     
-    int n = picotcp_recv(_sock_fd, data, length, 0);
+    int n = picotcp_read(_sock_fd, data, length);
     _is_connected = (picotcp_state(_sock_fd) == SOCK_CONNECTED);
     
     return n;
@@ -140,7 +140,7 @@
                 return readLen;
         }
         
-        int ret = picotcp_recv(_sock_fd, data + readLen, length - readLen, 0);
+        int ret = picotcp_read(_sock_fd, data + readLen, length - readLen);
         if (ret > 0) {
             readLen += ret;
         } else if (ret == 0) {