From d14582a1d92e036780166a0b5ec0494d7353cc75 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 13 Jan 2023 16:20:42 +0100 Subject: Implemented and tested managed FCGI application start, separated out process check functions to libreichwein --- plugins/fcgi/socket.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'plugins/fcgi/socket.h') diff --git a/plugins/fcgi/socket.h b/plugins/fcgi/socket.h index 272b844..ceee2a4 100644 --- a/plugins/fcgi/socket.h +++ b/plugins/fcgi/socket.h @@ -1,5 +1,6 @@ #pragma once +#include "fastcgiprocess.h" #include "fcgiid.h" #include @@ -83,3 +84,22 @@ public: size_t read(std::vector& data) override; }; +// File Socket, with Application started by us +class FileSocketApp: public Socket +{ +public: + FileSocketApp(const std::string& app_addr, boost::asio::io_context& io_context); + ~FileSocketApp() override; + + void open() override; + void close() override; + bool is_open() override; + size_t write(const std::vector& data) override; + size_t read(std::vector& data) override; + +private: + std::string m_socket_file; + FastCGIProcess m_fcgi_process; // Application server + FileSocket m_file_socket; // Connection from client side +}; + -- cgit v1.2.3