|
|
@@ -21,7 +21,6 @@ If you have any questions, please contact us: 1585346868@qq.com Or visit our web
|
|
|
#include "net/http_ssl.h"
|
|
|
#include "net/http_center.h"
|
|
|
#include "net/http_router.h"
|
|
|
-#include "net/http_session.h"
|
|
|
#include "net/util.h"
|
|
|
#include "net/http_agent.h"
|
|
|
#include "net/http_cache.h"
|
|
|
@@ -29,7 +28,6 @@ If you have any questions, please contact us: 1585346868@qq.com Or visit our web
|
|
|
ylib::network::http::website::website()
|
|
|
{
|
|
|
m_https = false;
|
|
|
- m_session_local_storage = new ylib::local_storage();
|
|
|
m_router = new network::http::router;
|
|
|
m_cache = new network::http::cache;
|
|
|
m_cdn = new network::http::cdn();
|
|
|
@@ -42,14 +40,12 @@ ylib::network::http::website::~website()
|
|
|
delete m_router;
|
|
|
delete m_cache;
|
|
|
delete m_cdn;
|
|
|
- delete m_session_local_storage;
|
|
|
}
|
|
|
|
|
|
bool ylib::network::http::website::start(const website_config& config)
|
|
|
{
|
|
|
m_config = config;
|
|
|
|
|
|
- //m_session_local_storage->center(center());
|
|
|
m_router->center(center());
|
|
|
m_cache->center(center());
|
|
|
m_cdn->center(center());
|
|
|
@@ -129,14 +125,8 @@ bool ylib::network::http::website::start(const website_config& config)
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
- if (m_session_local_storage->open(m_config.session.dirpath) == false)
|
|
|
- {
|
|
|
- m_lastErrorDesc = "session open failed("+m_session_local_storage->last_error() + "), dirpath: " + m_config.session.dirpath;
|
|
|
- return false;
|
|
|
- }
|
|
|
if (m_router->start(m_config.router) == false)
|
|
|
{
|
|
|
- m_session_local_storage->close();
|
|
|
m_lastErrorDesc = m_router->last_error();
|
|
|
return false;
|
|
|
}
|
|
|
@@ -195,7 +185,6 @@ void ylib::network::http::website::close()
|
|
|
m_router->close();
|
|
|
m_cache->stop();
|
|
|
m_cdn->close();
|
|
|
- m_session_local_storage->close();
|
|
|
}
|
|
|
network::http::router* network::http::website::router()
|
|
|
{
|