Uniform behaviour of WiFiClientSecure and WiFiClient setTimeout() (#6562)

* Uniform timeout WiFiClient-WiFiClientSecure

* Added missing prototype

* Add socket check on setTimeout
This commit is contained in:
Gonzalo Brusco
2022-04-26 08:46:07 -03:00
committed by GitHub
parent a9d33de70e
commit 823fe77e41
4 changed files with 64 additions and 27 deletions

View File

@ -32,7 +32,7 @@ protected:
int _lastError = 0;
int _peek = -1;
int _timeout = 0;
int _timeout;
bool _use_insecure;
const char *_CA_cert;
const char *_cert;
@ -79,7 +79,8 @@ public:
void setAlpnProtocols(const char **alpn_protos);
const mbedtls_x509_crt* getPeerCertificate() { return mbedtls_ssl_get_peer_cert(&sslclient->ssl_ctx); };
bool getFingerprintSHA256(uint8_t sha256_result[32]) { return get_peer_fingerprint(sslclient, sha256_result); };
int setTimeout(uint32_t seconds){ return 0; }
int setTimeout(uint32_t seconds);
int setSocketOption(int option, char* value, size_t len);
operator bool()
{