mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
removed unused code
This commit is contained in:
parent
9a88120cf7
commit
15abbeb86a
@ -77,7 +77,6 @@ class WsServer2::Private : public IServer
|
||||
public:
|
||||
Private(IIvokationHandler & handler, std::string const & protocol, int port, bool enable_tls);
|
||||
~Private();
|
||||
bool IsConnected();
|
||||
std::string const & GetUrl() const;
|
||||
void OnConnected(lws * wsi) override;
|
||||
void OnConnectionClosed(lws * wsi) override;
|
||||
@ -91,7 +90,6 @@ private:
|
||||
|
||||
IIvokationHandler & handler_;
|
||||
std::string protocol_;
|
||||
bool is_connected;
|
||||
bool is_shutdown_requested;
|
||||
lws * wsi_;
|
||||
lws_context * ws_context;
|
||||
@ -118,11 +116,6 @@ WsServer2::~WsServer2()
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool WsServer2::IsConnected()
|
||||
{
|
||||
return d->IsConnected();
|
||||
}
|
||||
|
||||
std::string const & WsServer2::GetUrl() const
|
||||
{
|
||||
return d->GetUrl();
|
||||
@ -146,7 +139,6 @@ WsServer2::Private::Private(
|
||||
bool enable_tls)
|
||||
: handler_(handler)
|
||||
, protocol_(protocol)
|
||||
, is_connected(false)
|
||||
, is_shutdown_requested(false)
|
||||
, wsi_(nullptr)
|
||||
{
|
||||
@ -211,16 +203,9 @@ void WsServer2::Private::Run(Private * self)
|
||||
}
|
||||
}
|
||||
|
||||
bool WsServer2::Private::IsConnected()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
return is_connected;
|
||||
}
|
||||
|
||||
void WsServer2::Private::OnConnected(lws * wsi)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
is_connected = true;
|
||||
wsi_ = wsi;
|
||||
}
|
||||
|
||||
@ -229,7 +214,6 @@ void WsServer2::Private::OnConnectionClosed(lws * wsi)
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
if (wsi == wsi_)
|
||||
{
|
||||
is_connected = false;
|
||||
wsi_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ public:
|
||||
int port = 0,
|
||||
bool enable_tls = false);
|
||||
virtual ~WsServer2();
|
||||
bool IsConnected();
|
||||
std::string const & GetUrl() const;
|
||||
void SendMessage(char const * message);
|
||||
void SendMessage(json_t * message);
|
||||
|
Loading…
Reference in New Issue
Block a user