Can't create Https connection

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Can't create Https connection

Postby ESP_Angus » Mon Mar 02, 2020 12:10 am

zliudr wrote:
Fri Feb 28, 2020 3:29 am
ESP_Angus,

Excellent explanation and thank you! I'll use "={0}" and the list so I know what the struct has. So why is it working in C (only having to assign values for pem_bytes and pem_buf)?
If the C version used a named initializer, ie (cfg = { .pem_bytes = a, .pem_buf =b };) then the compiler initializes any unnamed fields to zero.

(As Sprite notes, this style of initialization also works in C++ but only under a stricter set of conditions. "= { 0 }" is really a minimal form of this same initializer, to say "first element to 0, and all remaining elements to zero" ).

Who is online

Users browsing this forum: Google [Bot], MicroController and 83 guests