MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
output_http.h
Go to the documentation of this file.
1 #pragma once
2 #include <mist/defines.h>
3 #include <mist/http_parser.h>
4 #include "output.h"
5 
6 namespace Mist {
7 
8  class HTTPOutput : public Output {
9  public:
11  virtual ~HTTPOutput(){};
12  static void init(Util::Config * cfg);
13  void onRequest();
14  virtual void onFail();
15  virtual void onHTTP(){};
16  virtual void requestHandler();
17  virtual void onRecord(){
19  H.sendingChunks = false;
20  }
21  static bool listenMode(){return false;}
22  void reConnector(std::string & connector);
23  std::string getHandler();
24  /*begin-roxlu*/
25  void sendResponse(std::string message, std::string code = "200");
26  /*end-roxlu*/
27  protected:
29  std::string getConnectedHost();//LTS
30  std::string getConnectedBinHost();//LTS
31  bool isTrustedProxy(const std::string & ip);//LTS
32  };
33 }
HTTPOutput(Socket::Connection &conn)
Definition: output_http.cpp:8
bool sendingChunks
Definition: http_parser.h:50
virtual void onRecord()
Definition: output_http.h:17
std::string getConnectedHost()
Definition: output_http.cpp:340
std::string getHandler()
Definition: output_http.cpp:70
static void init(Util::Config *cfg)
Definition: output_http.cpp:18
Recording to file.
Definition: input.cpp:13
static bool listenMode()
Definition: output_http.h:21
Simple class for reading and writing HTTP 1.0 and 1.1.
Definition: http_parser.h:14
The output class is intended to be inherited by MistOut process classes.
Definition: output.h:41
virtual void onHTTP()
Definition: output_http.h:15
bool isTrustedProxy(const std::string &ip)
Definition: output_http.cpp:373
Deals with parsing configuration from commandline options.
Definition: config.h:18
void reConnector(std::string &connector)
Handles requests by starting a corresponding output process.
Definition: output_http.cpp:275
virtual void onFail()
Called when stream initialization has failed.
Definition: output_http.cpp:35
Definition: output_http.h:8
virtual void requestHandler()
Definition: output_http.cpp:155
std::string getConnectedBinHost()
Definition: output_http.cpp:354
virtual void onRecord()
Definition: output.h:83
void sendResponse(std::string message, std::string code="200")
Definition: output_http.cpp:400
This class is for easy communicating through sockets, either TCP or Unix.
Definition: socket.h:47
virtual ~HTTPOutput()
Definition: output_http.h:11
HTTP::Parser H
Definition: output_http.h:28
void onRequest()
Definition: output_http.cpp:212