mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-15 16:30:31 +02:00
add beginSSL
This commit is contained in:
@ -70,6 +70,17 @@ void WebSocketsClient::begin(String host, uint16_t port, String url) {
|
||||
begin(host.c_str(), port, url.c_str());
|
||||
}
|
||||
|
||||
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
|
||||
void WebSocketsClient::beginSSL(const char *host, uint16_t port, const char * url) {
|
||||
begin(host, port, url);
|
||||
_client.isSSL = true;
|
||||
}
|
||||
|
||||
void WebSocketsClient::beginSSL(String host, uint16_t port, String url) {
|
||||
beginSSL(host.c_str(), port, url.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* called in arduino loop
|
||||
*/
|
||||
|
@ -50,6 +50,11 @@ class WebSocketsClient: private WebSockets {
|
||||
void begin(const char *host, uint16_t port, const char * url = "/");
|
||||
void begin(String host, uint16_t port, String url = "/");
|
||||
|
||||
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
|
||||
void beginSSL(const char *host, uint16_t port, const char * url = "/");
|
||||
void beginSSL(String host, uint16_t port, String url = "/");
|
||||
#endif
|
||||
|
||||
void loop(void);
|
||||
|
||||
void onEvent(WebSocketClientEvent cbEvent);
|
||||
|
Reference in New Issue
Block a user