Skip to content

Commit ee3b75d

Browse files
authored
Merge pull request #115 from ln-12/patch-1
Making upgradeToSecuredConnection() public
2 parents 5f10bb2 + 43f4db5 commit ee3b75d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/tiny_websockets/client.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ namespace websockets {
3838

3939
bool connect(const WSInterfaceString url);
4040
bool connect(const WSInterfaceString host, const int port, const WSInterfaceString path);
41-
41+
bool connectSecure(const WSInterfaceString host, const int port, const WSInterfaceString path);
42+
4243
void onMessage(const MessageCallback callback);
4344
void onMessage(const PartialMessageCallback callback);
4445

src/websockets_client.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,12 @@ namespace websockets {
358358
return true;
359359
}
360360

361+
bool WebsocketsClient::connectSecure(WSInterfaceString host, int port, WSInterfaceString path) {
362+
upgradeToSecuredConnection();
363+
364+
return connect(host, port, path);
365+
}
366+
361367
void WebsocketsClient::onMessage(MessageCallback callback) {
362368
this->_messagesCallback = callback;
363369
}

0 commit comments

Comments
 (0)