1 #ifndef Http_Request_H_
2 #define Http_Request_H_
5 extern std::set< Http_Request * > Global_WebRequests_pendingNotify;
16 Global_WebRequests_pendingNotify.erase(
this);
20 Global_WebRequests_pendingNotify.insert((
Http_Request *)
this);
22 _state = WAITING_TO_FINALIZE;
27 CloseState TryAndFinalize()
29 return ConnectionDoNotClose;
34 std::string GetRequestType()
36 return _parser.GetRequestType();
39 std::string GetRawRequest()
41 return _parser.GetRawRequest();
44 std::string GetRequestURL()
46 return _parser.GetRequestURL();
49 std::string GetSourceAddress()
51 return _MyAddress.get_ip_port();
54 void AppendToResponse(
const std::string &in)
60 void SendThisResponse(
const std::string &in)
69 _state = WRITING_DATA;
77 bool HasOption(std::string in)
79 const std::string * answer = _parser.GetOption(in);
85 const char * GetOption(std::string in)
87 const std::string * answer = _parser.GetOption(in);
89 return answer->c_str();
92 std::string GetRequestOptionString()
94 return _parser.GetRequestOptionString();
97 static bool HttpManager_Initialize(
unsigned short port);
104 static void init_type() {
105 HttpConnection::init_type();
106 register_type(_type_handle,
"Http_Request",
107 HttpConnection::get_class_type());
110 return get_class_type();
112 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
123 #endif // Http_Request_H_
A simple place to store and munipulate tcp and port address for communication layer.
TypeHandle is the identifier used to differentiate C++ class types.
static Time_Clock GetCurrentTime()
The Default no param constructor.