Fixed UDP Client. Allow interfacing with WebSocketClient. General improvements.
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; }