Skip to content

Commit

Permalink
Merge pull request #115 from ln-12/patch-1
Browse files Browse the repository at this point in the history
Making upgradeToSecuredConnection() public
  • Loading branch information
gilmaimon authored Aug 6, 2021
2 parents 5f10bb2 + 43f4db5 commit ee3b75d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tiny_websockets/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ namespace websockets {

bool connect(const WSInterfaceString url);
bool connect(const WSInterfaceString host, const int port, const WSInterfaceString path);

bool connectSecure(const WSInterfaceString host, const int port, const WSInterfaceString path);

void onMessage(const MessageCallback callback);
void onMessage(const PartialMessageCallback callback);

Expand Down
6 changes: 6 additions & 0 deletions src/websockets_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ namespace websockets {
return true;
}

bool WebsocketsClient::connectSecure(WSInterfaceString host, int port, WSInterfaceString path) {
upgradeToSecuredConnection();

return connect(host, port, path);
}

void WebsocketsClient::onMessage(MessageCallback callback) {
this->_messagesCallback = callback;
}
Expand Down

0 comments on commit ee3b75d

Please sign in to comment.