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:
|
public:
|
||||||
Private(IIvokationHandler & handler, std::string const & protocol, int port, bool enable_tls);
|
Private(IIvokationHandler & handler, std::string const & protocol, int port, bool enable_tls);
|
||||||
~Private();
|
~Private();
|
||||||
bool IsConnected();
|
|
||||||
std::string const & GetUrl() const;
|
std::string const & GetUrl() const;
|
||||||
void OnConnected(lws * wsi) override;
|
void OnConnected(lws * wsi) override;
|
||||||
void OnConnectionClosed(lws * wsi) override;
|
void OnConnectionClosed(lws * wsi) override;
|
||||||
@ -91,7 +90,6 @@ private:
|
|||||||
|
|
||||||
IIvokationHandler & handler_;
|
IIvokationHandler & handler_;
|
||||||
std::string protocol_;
|
std::string protocol_;
|
||||||
bool is_connected;
|
|
||||||
bool is_shutdown_requested;
|
bool is_shutdown_requested;
|
||||||
lws * wsi_;
|
lws * wsi_;
|
||||||
lws_context * ws_context;
|
lws_context * ws_context;
|
||||||
@ -118,11 +116,6 @@ WsServer2::~WsServer2()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WsServer2::IsConnected()
|
|
||||||
{
|
|
||||||
return d->IsConnected();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string const & WsServer2::GetUrl() const
|
std::string const & WsServer2::GetUrl() const
|
||||||
{
|
{
|
||||||
return d->GetUrl();
|
return d->GetUrl();
|
||||||
@ -146,7 +139,6 @@ WsServer2::Private::Private(
|
|||||||
bool enable_tls)
|
bool enable_tls)
|
||||||
: handler_(handler)
|
: handler_(handler)
|
||||||
, protocol_(protocol)
|
, protocol_(protocol)
|
||||||
, is_connected(false)
|
|
||||||
, is_shutdown_requested(false)
|
, is_shutdown_requested(false)
|
||||||
, wsi_(nullptr)
|
, 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)
|
void WsServer2::Private::OnConnected(lws * wsi)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(mutex);
|
std::unique_lock<std::mutex> lock(mutex);
|
||||||
is_connected = true;
|
|
||||||
wsi_ = wsi;
|
wsi_ = wsi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +214,6 @@ void WsServer2::Private::OnConnectionClosed(lws * wsi)
|
|||||||
std::unique_lock<std::mutex> lock(mutex);
|
std::unique_lock<std::mutex> lock(mutex);
|
||||||
if (wsi == wsi_)
|
if (wsi == wsi_)
|
||||||
{
|
{
|
||||||
is_connected = false;
|
|
||||||
wsi_ = nullptr;
|
wsi_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ public:
|
|||||||
int port = 0,
|
int port = 0,
|
||||||
bool enable_tls = false);
|
bool enable_tls = false);
|
||||||
virtual ~WsServer2();
|
virtual ~WsServer2();
|
||||||
bool IsConnected();
|
|
||||||
std::string const & GetUrl() const;
|
std::string const & GetUrl() const;
|
||||||
void SendMessage(char const * message);
|
void SendMessage(char const * message);
|
||||||
void SendMessage(json_t * message);
|
void SendMessage(json_t * message);
|
||||||
|
Loading…
Reference in New Issue
Block a user