1
0
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:
Falk Werner
2022-12-31 20:41:45 +01:00
parent a86061356a
commit 2e3d7a66b5
17 changed files with 403 additions and 95 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;