diff --git a/LEDLightControl.h b/LEDLightControl.h index aa190e2..8a5bb5e 100644 --- a/LEDLightControl.h +++ b/LEDLightControl.h @@ -442,6 +442,7 @@ void LEDLightControl::ConnectToSocket() // event again should network conditions become better favorable. return; } + m_TheSocketAddress.set_port(m_EchoServerPort); if (m_TheTransportSocketType == TransportSocket_t::TCP) diff --git a/Utilities.h b/Utilities.h index cde60b9..82cbc30 100644 --- a/Utilities.h +++ b/Utilities.h @@ -155,8 +155,15 @@ namespace Utilities // user can choose to specify IP addresses directly in the mbed_app.json // echo-server-hostname field. This will facilitate testing with // locally hosted Echo Servers, which by necessity, do not have - // DNS names. - ipAddress.emplace(address.c_str()); + // DNS names. + + // In which case the following is how we can ensure that the requisite + // SocketAddress object that is normally created during FQDN resolution, + // is manually constructed and propagated back to the User: + SocketAddress tempSockAddress(address.c_str(), 0); + *pTheSocketAddress = tempSockAddress; + + ipAddress.emplace(address.c_str()); } } diff --git a/mbed_app.json b/mbed_app.json index 216975d..5ec4829 100644 --- a/mbed_app.json +++ b/mbed_app.json @@ -7,7 +7,7 @@ "sock-type": "NUERTEY_TCP", "echo-server-hostname": { "help": "Echo server host name.", - "value": "\"10.50.10.25\"" + "value": "\"10.42.0.1\"" }, "echo-server-port": { "help": "Echo server port number.",