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.
Dependents: ESP8266_W7500_Example DualNetworkInterface-Basic
Fork of ESP8266Interface by
Diff: Socket/TCSocketConnection.cpp
- Revision:
- 31:fd0eaf273b11
- Parent:
- 30:c035696b9397
--- a/Socket/TCSocketConnection.cpp Wed Apr 29 22:43:03 2015 +0000
+++ b/Socket/TCSocketConnection.cpp Thu Apr 30 04:53:21 2015 +0000
@@ -31,17 +31,17 @@
// if (init_socket(SOCK_STREAM) < 0)
// return -1;
//
-// if (set_address(host, port) != 0)
-// return -1;
+ if (set_address(host, port) != 0)
+ return -1;
//
// if (lwip_connect(_sock_fd, (const struct sockaddr *) &_remoteHost, sizeof(_remoteHost)) < 0) {
// close();
// return -1;
// }
// _is_connected = true;
- _is_connected();
+ _is_connected = ESP8266->start(ESP_TCP_TYPE,_ipAddress,_port);
- return 0;
+ return _is_connected;
}
bool TCPSocketConnection::is_connected(void)
@@ -64,6 +64,7 @@
// _is_connected = (n != 0);
//
// return n;
+
return 0;
}
