esp_tls_plain_tcp_connect() function
Creates a plain TCP connection, returning a valid socket fd on success or an error handle
Arguments
host
Hostname of the host.
hostlen
Length of hostname.
port
Port number of the host.
cfg
ESP-TLS configuration as esp_tls_cfg_t.
error_handle
ESP-TLS error handle holding potential errors occurred during connection
sockfd
Socket descriptor if successfully connected on TCP layer
Return value
ESP_OK on success ESP_ERR_INVALID_ARG if invalid output parameters ESP-TLS based error codes on failure