8000 Merge pull request #199 from jesben/master · Quanghoster/arduinoWebSockets@ae3dd10 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae3dd10

8000 Browse files
authored
Merge pull request Links2004#199 from jesben/master
Added method for beginSocketIOSSL
2 parents 81e567b + 40f84c1 commit ae3dd10

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/WebSocketsClient.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ void WebSocketsClient::beginSocketIO(String host, uint16_t port, String url, Str
101101
beginSocketIO(host.c_str(), port, url.c_str(), protocol.c_str());
102102
}
103103

104+
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
105+
void WebSocketsClient::beginSocketIOSSL(const char *host, uint16_t port, const char * url, const char * protocol) {
106+
begin(host, port, url, protocol);
107+
_client.isSocketIO = true;
108+
_client.isSSL = true;
109+
_fingerprint = "";
110+
}
111+
112+
void WebSocketsClient::beginSocketIOSSL(String host, uint16_t port, String url, String protocol) {
113+
beginSocketIOSSL(host.c_str(), port, url.c_str(), protocol.c_str());
114+
}
115+
#endif
116+
104117
#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
105118
/**
106119
* called in arduino loop

src/WebSocketsClient.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class WebSocketsClient: private WebSockets {
5050
void beginSocketIO(const char *host, uint16_t port, const char * url = "/socket.io/?EIO=3", const char * protocol = "arduino");
5151
void beginSocketIO(String host, uint16_t port, String url = "/socket.io/?EIO=3", String protocol = "arduino");
5252

53+
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
54+
void beginSocketIOSSL(const char *host, uint16_t port, const char * url = "/socket.io/?EIO=3", const char * protocol = "arduino");
55+
void beginSocketIOSSL(String host, uint16_t port, String url = "/socket.io/?EIO=3", String protocol = "arduino");
56+
#endif
57+
5358
#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
5459
void loop(void);
5560
#else

0 commit comments

Comments
 (0)
0