]> git.sesse.net Git - cubemap/blobdiff - httpinput.h
Support input from pipes (subprocesses).
[cubemap] / httpinput.h
index 4ee5ede87542866182133f23b40b2bb12b8735c7..890cc9ef91256b92145e58dcc3425831fa0747fc 100644 (file)
@@ -12,6 +12,8 @@
 
 class InputProto;
 
+// Despite the name, covers input over both HTTP and pipes, both typically
+// wrapped in Metacube.
 class HTTPInput : public Input {
 public:
        HTTPInput(const std::string &url, Input::Encoding encoding);
@@ -35,6 +37,10 @@ private:
        // Open a socket that connects to the given host and port. Does DNS resolving.
        int lookup_and_connect(const std::string &host, const std::string &port);
 
+       // Open a child process with the given command line (given to /bin/sh).
+       // Returns a pipe to its standard output.
+       int open_child_process(const std::string &cmdline);
+
        // Parses a HTTP response. Returns false if it not a 200.
        bool parse_response(const std::string &response);