File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#include " HelloHttpsClient.h"
23
23
24
- #include " easy-connect.h"
25
-
26
24
#include " mbedtls/platform.h"
27
25
#include " mbedtls/config.h"
28
26
#include " mbedtls/ssl.h"
33
31
34
32
#include < stdint.h>
35
33
#include < string.h>
34
+ #include " mbed.h"
36
35
37
36
const char *HelloHttpsClient::DRBG_PERSONALIZED_STR =
38
37
" Mbed TLS helloword client" ;
@@ -232,20 +231,16 @@ int HelloHttpsClient::configureTCPSocket()
232
231
{
233
232
int ret;
234
233
235
- /*
236
- * Use easy-connect lib to support multiple network bearers. See
237
- * https://github.com/ARMmbed/easy-connect README.md for more information.
238
- */
239
- #if HELLO_HTTPS_CLIENT_DEBUG_LEVEL > 0
240
- NetworkInterface *network = easy_connect (true );
241
- #else
242
- NetworkInterface *network = easy_connect (false );
243
- #endif /* HELLO_HTTPS_CLIENT_DEBUG_LEVEL > 0 */
234
+ NetworkInterface *network = NetworkInterface::get_default_instance ();
244
235
if (network == NULL ) {
245
- mbedtls_printf (" easy_connect() returned NULL\n "
246
- " Failed to connect to the network\n " );
236
+ mbedtls_printf (" ERROR: No network interface found!\n " );
247
237
return -1 ;
248
238
}
239
+ ret = network->connect ();
240
+ if (ret != 0 ) {
241
+ printf (" Error! network->connect() returned: %d\n " , r);
242
+ return ret;
243
+ }
249
244
250
245
if ((ret = socket.open (network)) != NSAPI_ERROR_OK) {
251
246
mbedtls_printf (" socket.open() returned %d\n " , ret);
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments