Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Socket by
Revision 20:b06c58defd65, committed 2013-12-13
- Comitter:
- rebonatto
- Date:
- Fri Dec 13 11:36:01 2013 +0000
- Parent:
- 19:434906b5b977
- Commit message:
- Modify
Changed in this revision
TCPSocketConnection.cpp | Show annotated file Show diff for this revision Revisions of this file |
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; }