mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Added String hostname support to WiFiClient and WiFiClientSecure (#3349)
* Added String hostname support to WiFiClient and WiFiClientSecure * Typo in WiFi
This commit is contained in:
parent
0b2df35117
commit
28803540a2
@ -102,6 +102,11 @@ int WiFiClient::connect(const char* host, uint16_t port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WiFiClient::connect(const String host, uint16_t port)
|
||||
{
|
||||
return connect(host.c_str(), port);
|
||||
}
|
||||
|
||||
int WiFiClient::connect(IPAddress ip, uint16_t port)
|
||||
{
|
||||
ip_addr_t addr;
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
uint8_t status();
|
||||
virtual int connect(IPAddress ip, uint16_t port);
|
||||
virtual int connect(const char *host, uint16_t port);
|
||||
virtual int connect(const String host, uint16_t port);
|
||||
virtual size_t write(uint8_t);
|
||||
virtual size_t write(const uint8_t *buf, size_t size);
|
||||
size_t write_P(PGM_P buf, size_t size);
|
||||
|
@ -454,6 +454,11 @@ int WiFiClientSecure::connect(const char* name, uint16_t port)
|
||||
return _connectSSL(name);
|
||||
}
|
||||
|
||||
int WiFiClientSecure::connect(const String host, uint16_t port)
|
||||
{
|
||||
return connect(host.c_str(), port);
|
||||
}
|
||||
|
||||
int WiFiClientSecure::_connectSSL(const char* hostName)
|
||||
{
|
||||
if (!_ssl) {
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
WiFiClientSecure& operator=(const WiFiClientSecure&);
|
||||
|
||||
int connect(IPAddress ip, uint16_t port) override;
|
||||
int connect(const String host, uint16_t port) override;
|
||||
int connect(const char* name, uint16_t port) override;
|
||||
|
||||
bool verify(const char* fingerprint, const char* domain_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user