9 #include "../framework/bridgetask.h"
10 #include "../http/webservertask.h"
11 #include "../framework/serversocket.h"
45 double start()
override;
54 std::string url()
const;
55 std::string port()
const;
58 bool clientConnected()
const;
62 std::atomic<uint16_t> listen_port;
Tasks may use a bridge to communicate with an application running outside the event loop.
Definition: bridgetask.h:43
Read configuration from file or string.
Definition: taskconfig.h:44
The purpose of a task is to manage socket connections, and/or to execute timers.
Definition: task.h:39
Definition: websocketbridge.cpp:16
Definition: websocketbridge.h:39
void sendMsgToClient(const std::string &msg) override
The agent will call this to pass messages to the client.
Definition: websocketbridge.cpp:131
void handleExecution(Task *sender, const std::string &msg) override
Callback to execute code on behalf of another Task.
Definition: websocketbridge.cpp:90
void taskFinished(Task *task) override
If the agent dies, a special message will be sent to notify the client.
Definition: websocketbridge.cpp:96
double start() override
Will add the agent task to the EventLoop.
Definition: websocketbridge.cpp:80