删除session
This commit is contained in:
@@ -19,7 +19,6 @@ If you have any questions, please contact us: 1585346868@qq.com Or visit our web
|
||||
#if USE_NET_HTTP_WEBSITE
|
||||
#include "net/http_router.h"
|
||||
#include "net/http_server.h"
|
||||
#include "net/http_session.h"
|
||||
#include "net/http_website.h"
|
||||
#include "net/util.h"
|
||||
ylib::network::http::center::center()
|
||||
|
||||
@@ -20,7 +20,6 @@ If you have any questions, please contact us: 1585346868@qq.com Or visit our web
|
||||
#if USE_NET_HTTP_WEBSITE
|
||||
#include "util/strutils.h"
|
||||
#include "util/codec.h"
|
||||
#include "net/http_session.h"
|
||||
#include "net/http_server.h"
|
||||
#include "net/http_reqpack.h"
|
||||
#include "net/http_center.h"
|
||||
@@ -82,13 +81,6 @@ std::string ylib::network::http::request::host()
|
||||
{
|
||||
return m_reqpack->host();
|
||||
}
|
||||
network::http::session& ylib::network::http::request::session(const std::string& session_id)
|
||||
{
|
||||
if (session_id.empty())
|
||||
return m_session;
|
||||
m_session.init(website(), session_id);
|
||||
return m_session;
|
||||
}
|
||||
network::http::reqpack* ylib::network::http::request::reqpack()
|
||||
{
|
||||
return m_reqpack;
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user