8000 added subprotocol for ssl client also · robokoding/arduinoWebSockets@358d8c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 358d8c7

Browse files
committed
added subprotocol for ssl client also
1 parent 3e0b0bd commit 358d8c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/WebSocketsClient.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ void WebSocketsClient::begin(String host, uint16_t port, String url, String Prot
7272
}
7373

7474
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
75-
void WebSocketsClient::beginSSL(const char *host, uint16_t port, const char * url, const char * fingerprint) {
76-
begin(host, port, url);
75+
void WebSocketsClient::beginSSL(const char *host, uint16_t port, const char * url, const char * fingerprint, const char * Protocol) {
76+
begin(host, port, url, Protocol);
7777
_client.isSSL = true;
7878
_fingerprint = fingerprint;
7979
}
8080

81-
void WebSocketsClient::beginSSL(String host, uint16_t port, String url, String fingerprint) {
82-
beginSSL(host.c_str(), port, url.c_str(), fingerprint.c_str());
81+
void WebSocketsClient::beginSSL(String host, uint16_t port, String url, String fingerprint, String Protocol) {
82+
beginSSL(host.c_str(), port, url.c_str(), fingerprint.c_str(), Protocol.c_str());
8383
}
8484
#endif
8585

src/WebSocketsClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class WebSocketsClient: private WebSockets {
4040
void begin(String host, uint16_t port, String url = "/", String Protocol = "arduino");
4141

4242
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
43-
void beginSSL(const char *host, uint16_t port, const char * url = "/", const char * = "");
44-
void beginSSL(String host, uint16_t port, String url = "/", String fingerprint = "");
43+
void beginSSL(const char *host, uint16_t port, const char * url = "/", const char * = "", const char * Protocol = "arduino");
44+
void beginSSL(String host, uint16_t port, String url = "/", String fingerprint = "", String Protocol = "arduino");
4545
#endif
4646

4747
void loop(void);

0 commit comments

Comments
 (0)
0