summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/socket.h
diff options
context:
space:
mode:
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
+};
+