diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2018-04-18 19:20:54 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-05-18 15:16:39 +0200 |
commit | b483f477ddfc20d936a7e202449911c4ec6b525b (patch) | |
tree | c2f23f66c2b7502b9dcf8f5a13de2be652992475 /net | |
parent | d66e8d13b7fc0fc638122fae44cf1591eca1aaca (diff) |
Allow a 'monitor' to be connected to remotely if configured.
So far monitors have the access an permissions of an
authenticated admin.
Change-Id: I59dfa8a646a60584a5c113ee0521e9afba4f6b76
Diffstat (limited to 'net')
-rw-r--r-- | net/Socket.hpp | 2 | ||||
-rw-r--r-- | net/WebSocketHandler.hpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/net/Socket.hpp b/net/Socket.hpp index 84632a4f2..36d1a0168 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -118,7 +118,7 @@ public: } /// Create socket of the given type. - int createSocket(Type type); + static int createSocket(Type type); /// Returns the OS native socket fd. int getFD() const { return _fd; } diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index b363364fd..f157720b0 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -432,7 +432,12 @@ protected: const std::string res = oss.str(); LOG_TRC("#" << socket->getFD() << ": Sending WS Upgrade response: " << res); socket->send(res); + setWebSocket(); + } + void setWebSocket() + { + std::shared_ptr<StreamSocket> socket = _socket.lock(); socket->setWebSocket(); // No need to ping right upon connection/upgrade, |