Modify changes to test TCP socket.

Dependents:   EthernetInterface

Fork of Socket by mbed official

Revision:
20:b06c58defd65
Parent:
19:434906b5b977
diff -r 434906b5b977 -r b06c58defd65 TCPSocketConnection.cpp
--- a/TCPSocketConnection.cpp	Mon Aug 19 18:38:18 2013 +0300
+++ b/TCPSocketConnection.cpp	Fri Dec 13 11:36:01 2013 +0000
@@ -18,6 +18,8 @@
 #include "TCPSocketConnection.h"
 #include <cstring>
 
+#include "stdio.h"
+
 using std::memset;
 using std::memcpy;
 
@@ -26,13 +28,18 @@
 }
 
 int TCPSocketConnection::connect(const char* host, const int port) {
-    if (init_socket(SOCK_STREAM) < 0)
+    if (init_socket(SOCK_STREAM) < 0){
+        printf("Erro SOCK_STREAM\n");
         return -1;
+    }
     
-    if (set_address(host, port) != 0)
+    if (set_address(host, port) != 0){
+        printf("Erro set_address\n");
         return -1;
+    }
     
     if (lwip_connect(_sock_fd, (const struct sockaddr *) &_remoteHost, sizeof(_remoteHost)) < 0) {
+        //printf("Erro lwip_connect\n");
         close();
         return -1;
     }