1 #ifndef HttpConnection_H 2 #define HttpConnection_H 5 #include "parsedhttprequest.h" 6 #include "baseincomingset.h" 8 #include "bufferedwriter_growable.h" 9 #include "http_bufferedreader.h" 21 enum STATE_CONNECTIONS {
24 WAITING_TO_FINALIZE =3,
30 STATE_CONNECTIONS _state;
36 std::string _headerDetail;
46 CloseState ProcessMessage(
char * message,
Time_Clock ¤tTime);
47 int DoReadHeader(
char * message,
int buffersize,
Time_Clock ¤tTime);
48 int DoReadBody(
char * message,
int buffersize,
Time_Clock ¤tTime);
49 int ReadIt(
char * message,
int buffersize,
Time_Clock ¤tTime);
52 virtual CloseState TryAndFinalize() { _state = WRITING_DATA; ;
return ConnectionDoNotClose; };
54 std::string GetFullmessage() {
return _headerDetail + _bodyDetail; };
60 static void init_type() {
61 Socket_TCP::init_type();
62 register_type(_type_handle,
"HttpConnection",
63 Socket_TCP::get_class_type());
66 return get_class_type();
68 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
75 #endif // HttpConnection_H
Base functionality for a TCP connected socket This class is pretty useless by itself but it does hide...
A simple place to store and munipulate tcp and port address for communication layer.
TypeHandle is the identifier used to differentiate C++ class types.