EHS Embedded HTTP Server
1.5.1.0
|
52 bool operator() (
const std::string & s1,
const std::string & s2 )
const
54 return strcasecmp( s1.c_str(), s2.c_str() ) < 0;
59 # define ehs_autoptr std::unique_ptr
60 # define ehs_move(x) std::move(x)
63 # include <boost/shared_ptr.hpp>
64 # define ehs_autoptr boost::shared_ptr
65 # define ehs_move(x) (x)
69 #define DEPRECATED(x) __attribute__((deprecated (x)))
73 typedef uint64_t ehs_threadid_t;
74 extern ehs_threadid_t THREADID(pthread_t t);
76 typedef pthread_t ehs_threadid_t;
108 void SetBody(
const char *ipsBody,
size_t inBodyLength) {
109 m_sBody = std::string(ipsBody, inBodyLength);
161 typedef std::map < std::string, std::string > StringMap;
164 typedef std::map < std::string, std::string, __caseless > StringCaseMap;
167 typedef std::list < std::string > StringList;
170 typedef std::list < EHSConnection * > EHSConnectionList;
173 typedef std::map < std::string, EHS * > EHSMap;
176 typedef std::map < std::string, Datum > EHSServerParameters;
179 typedef std::map < std::string, std::string > CookieMap;
182 typedef std::map < std::string, FormValue > FormValueMap;
185 typedef std::map < std::string, Datum > CookieParameters;
188 typedef std::deque <ehs_autoptr<GenericResponse> > ResponseQueue;
191 typedef std::map < ehs_threadid_t, HttpRequest * > CurrentRequestMap;
194 typedef std::list < HttpRequest * > HttpRequestList;
EHSConnection abstracts the concept of a connection to an EHS application.
EHSConnection * m_poEHSConnection
ehs connection object this response goes back on
This class represents what is sent back to the client.
void EnableIdleTimeout(bool enable=true)
Enable/Disable idle-timeout handling for the current connection.
bool operator()(const std::string &s1, const std::string &s2) const
case-insensitive comparator
std::string & GetBody()
retrieves the body of this response.
Caseless Compare class for case insensitive map.
void SetBody(const char *ipsBody, size_t inBodyLength)
Sets the body of this instance.
class that makes it easy to go between numbers and strings
EHSConnection * GetConnection()
retrieves the EHSConnection, on which this response is supposed to be send.
GenericResponse(int inResponseId, EHSConnection *ipoEHSConnection)
Constructs a new instance.
void EnableKeepAlive(bool enable=true)
Enable/Disable TCP keepalive on the underlying socket of the current connection.
This class represents what is sent back to the client.
std::string m_sBody
the actual body to be sent back
This class represents a clients HTTP request.
int m_nResponseId
response id for making sure we send responses in the right order
virtual ~GenericResponse()
Destructor.
EHSServer contains all the network related services for EHS.
EHS provides HTTP server functionality to a child class.