summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/socket.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-13 16:20:42 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-13 16:20:42 +0100
commitd14582a1d92e036780166a0b5ec0494d7353cc75 (patch)
treeb14c7d52f8bdbe511a2efb25aae45a565db202d0 /plugins/fcgi/socket.h
parentbde446bcc08483707dc20a0bbf85ad70bc9d1496 (diff)
Implemented and tested managed FCGI application start, separated out process check functions to libreichwein
Diffstat (limited to 'plugins/fcgi/socket.h')
-rw-r--r--plugins/fcgi/socket.h20
1 files changed, 20 insertions, 0 deletions
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 <boost/asio.hpp>
@@ -83,3 +84,22 @@ public:
size_t read(std::vector<char>& 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<char>& data) override;
+ size_t read(std::vector<char>& data) override;
+
+private:
+ std::string m_socket_file;
+ FastCGIProcess m_fcgi_process; // Application server
+ FileSocket m_file_socket; // Connection from client side
+};
+