Browse Source

* rename namespace for http

pull/489/head
hagen 9 years ago
parent
commit
332f0118a2
  1. 4
      Daemon.cpp
  2. 10
      HTTPServer.cpp
  3. 10
      HTTPServer.h

4
Daemon.cpp

@ -36,7 +36,7 @@ namespace i2p @@ -36,7 +36,7 @@ namespace i2p
Daemon_Singleton_Private() {};
~Daemon_Singleton_Private() {};
std::unique_ptr<i2p::util::HTTPServer> httpServer;
std::unique_ptr<i2p::http::HTTPServer> httpServer;
std::unique_ptr<i2p::client::I2PControlService> m_I2PControlService;
#ifdef USE_UPNP
@ -202,7 +202,7 @@ namespace i2p @@ -202,7 +202,7 @@ namespace i2p
std::string httpAddr; i2p::config::GetOption("http.address", httpAddr);
uint16_t httpPort; i2p::config::GetOption("http.port", httpPort);
LogPrint(eLogInfo, "Daemon: starting HTTP Server at ", httpAddr, ":", httpPort);
d.httpServer = std::unique_ptr<i2p::util::HTTPServer>(new i2p::util::HTTPServer(httpAddr, httpPort));
d.httpServer = std::unique_ptr<i2p::http::HTTPServer>(new i2p::http::HTTPServer(httpAddr, httpPort));
d.httpServer->Start();
}

10
HTTPServer.cpp

@ -26,10 +26,8 @@ @@ -26,10 +26,8 @@
// For image and info
#include "version.h"
namespace i2p
{
namespace util
{
namespace i2p {
namespace http {
const char *itoopieImage =
"<img alt=\"ICToopie Icon\" src=\"data:image/png;base64,"
"iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXM"
@ -980,5 +978,5 @@ namespace util @@ -980,5 +978,5 @@ namespace util
auto conn = std::make_shared<HTTPConnection> (newSocket);
conn->Receive ();
}
}
}
} // http
} // i2p

10
HTTPServer.h

@ -1,10 +1,8 @@ @@ -1,10 +1,8 @@
#ifndef HTTP_SERVER_H__
#define HTTP_SERVER_H__
namespace i2p
{
namespace util
{
namespace i2p {
namespace http {
extern const char *itoopieImage;
extern const char *itoopieFavicon;
const size_t HTTP_CONNECTION_BUFFER_SIZE = 8192;
@ -124,7 +122,7 @@ namespace util @@ -124,7 +122,7 @@ namespace util
protected:
virtual void CreateConnection(std::shared_ptr<boost::asio::ip::tcp::socket> newSocket);
};
}
}
} // http
} // i2p
#endif /* HTTP_SERVER_H__ */

Loading…
Cancel
Save