1 #ifndef AKTUALIZR_SECONDARY_TCP_SERVER_H_ 2 #define AKTUALIZR_SECONDARY_TCP_SERVER_H_ 5 #include <condition_variable> 8 #include "utilities/utils.h" 18 enum class ExitReason {
25 in_port_t port = 0,
bool reboot_after_install =
false);
37 void wait_until_running(
int timeout = 10);
39 in_port_t port()
const;
40 ExitReason exit_reason()
const;
43 bool HandleOneConnection(
int socket);
48 std::atomic<bool> keep_running_;
49 bool reboot_after_install_;
50 ExitReason exit_reason_{ExitReason::kNotApplicable};
53 std::mutex running_condition_mutex_;
54 std::condition_variable running_condition_;
57 #endif // AKTUALIZR_SECONDARY_TCP_SERVER_H_ void run()
Accept connections on the socket, decode requests and respond using the secondary implementation...
Listens on a socket, decodes calls (ASN.1) and forwards them to an Uptane Secondary implementation...