added subprotocol for ssl client also

This commit is contained in:
Bruno Tibério
2016-01-24 17:08:22 +00:00
parent 3e0b0bd377
commit 358d8c769e
2 changed files with 6 additions and 6 deletions

View File

@ -72,14 +72,14 @@ void WebSocketsClient::begin(String host, uint16_t port, String url, String Prot
} }
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) #if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
void WebSocketsClient::beginSSL(const char *host, uint16_t port, const char * url, const char * fingerprint) { void WebSocketsClient::beginSSL(const char *host, uint16_t port, const char * url, const char * fingerprint, const char * Protocol) {
begin(host, port, url); begin(host, port, url, Protocol);
_client.isSSL = true; _client.isSSL = true;
_fingerprint = fingerprint; _fingerprint = fingerprint;
} }
void WebSocketsClient::beginSSL(String host, uint16_t port, String url, String fingerprint) { void WebSocketsClient::beginSSL(String host, uint16_t port, String url, String fingerprint, String Protocol) {
beginSSL(host.c_str(), port, url.c_str(), fingerprint.c_str()); beginSSL(host.c_str(), port, url.c_str(), fingerprint.c_str(), Protocol.c_str());
} }
#endif #endif

View File

@ -40,8 +40,8 @@ class WebSocketsClient: private WebSockets {
void begin(String host, uint16_t port, String url = "/", String Protocol = "arduino"); void begin(String host, uint16_t port, String url = "/", String Protocol = "arduino");
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) #if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
void beginSSL(const char *host, uint16_t port, const char * url = "/", const char * = ""); void beginSSL(const char *host, uint16_t port, const char * url = "/", const char * = "", const char * Protocol = "arduino");
void beginSSL(String host, uint16_t port, String url = "/", String fingerprint = ""); void beginSSL(String host, uint16_t port, String url = "/", String fingerprint = "", String Protocol = "arduino");
#endif #endif
void loop(void); void loop(void);