mirror of
https://github.com/falk-werner/webfuse
synced 2026-03-02 03:40:24 +00:00
added basic access test
This commit is contained in:
@@ -34,6 +34,11 @@ public:
|
||||
client.service();
|
||||
}
|
||||
|
||||
void interrupt()
|
||||
{
|
||||
client.interrupt();
|
||||
}
|
||||
|
||||
void set_connection_listener(std::function<void(bool)> listener)
|
||||
{
|
||||
client.set_connection_listener(listener);
|
||||
@@ -144,6 +149,11 @@ void provider::service()
|
||||
d->service();
|
||||
}
|
||||
|
||||
void provider::interrupt()
|
||||
{
|
||||
d->interrupt();
|
||||
}
|
||||
|
||||
void provider::set_connection_listener(std::function<void(bool)> listener)
|
||||
{
|
||||
d->set_connection_listener(listener);
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
void set_connection_listener(std::function<void(bool)> listener);
|
||||
void connect(std::string const & url);
|
||||
void service();
|
||||
void interrupt();
|
||||
private:
|
||||
class detail;
|
||||
detail * d;
|
||||
|
||||
@@ -34,6 +34,7 @@ extern "C" int webfuse_client_callback(lws * wsi, lws_callback_reasons reason, v
|
||||
context->connection_listener(true);
|
||||
break;
|
||||
case LWS_CALLBACK_CLIENT_CONNECTION_ERROR:
|
||||
std::cout << "connection error" << std::endl;
|
||||
// fall-through
|
||||
case LWS_CALLBACK_CLIENT_CLOSED:
|
||||
std::cout << "closed" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user