Browse Source

* HTTPServer.{cpp,h}: cleanup

pull/489/head
hagen 9 years ago
parent
commit
48b3959cfb
  1. 8
      HTTPServer.cpp
  2. 4
      HTTPServer.h

8
HTTPServer.cpp

@ -836,8 +836,7 @@ namespace http { @@ -836,8 +836,7 @@ namespace http {
{
m_Acceptor.close();
m_Service.stop ();
if (m_Thread)
{
if (m_Thread) {
m_Thread->join ();
m_Thread = nullptr;
}
@ -858,12 +857,11 @@ namespace http { @@ -858,12 +857,11 @@ namespace http {
void HTTPServer::HandleAccept(const boost::system::error_code& ecode,
std::shared_ptr<boost::asio::ip::tcp::socket> newSocket)
{
if (!ecode)
{
if (ecode)
return;
CreateConnection(newSocket);
Accept ();
}
}
void HTTPServer::CreateConnection(std::shared_ptr<boost::asio::ip::tcp::socket> newSocket)
{

4
HTTPServer.h

@ -6,7 +6,6 @@ namespace http { @@ -6,7 +6,6 @@ namespace http {
extern const char *itoopieImage;
extern const char *itoopieFavicon;
const size_t HTTP_CONNECTION_BUFFER_SIZE = 8192;
const int HTTP_DESTINATION_REQUEST_TIMEOUT = 10; // in seconds
class HTTPConnection: public std::enable_shared_from_this<HTTPConnection>
{
@ -59,9 +58,6 @@ namespace http { @@ -59,9 +58,6 @@ namespace http {
protected:
virtual void RunRequest ();
public:
};
class HTTPServer

Loading…
Cancel
Save