跳转至

File session.cc

FileList > src > utils > session.cc

Go to the source code of this file

  • #include <boost/asio/use_awaitable.hpp>
  • #include <boost/beast.hpp>
  • #include <boost/beast/core/buffers_to_string.hpp>
  • #include <boost/beast/core/stream_traits.hpp>
  • #include <boost/beast/http/message.hpp>
  • #include <boost/beast/ssl.hpp>
  • #include <boost/url.hpp>
  • #include <memory>
  • #include <mutex>
  • #include <qqmusic/result.h>
  • #include <qqmusic/utils/cookie.h>
  • #include <qqmusic/utils/session.h>
  • #include <utility>

Namespaces

Type Name
namespace qqmusic
namespace utils
简易Cookie管理器, 负责cookie的序列化和反序列化, 依赖 nlohmann::json 实现 目前不支持路径嵌套和Expires HttpOnly 这样的特性

Public Static Functions

Type Name
qqmusic::Task< qqmusic::Result< qqmusic::utils::HttpResponse > > handle_http_redirecting (qqmusic::utils::Session & self, boost::url_view url, boost::beast::http::request< boost::beast::http::string_body > & req, qqmusic::utils::HttpResponse & resp)
qqmusic::Task< qqmusic::Result< qqmusic::utils::HttpResponse > > handle_https_redirecting (qqmusic::utils::Session & self, boost::url_view url, boost::beast::http::request< boost::beast::http::string_body > & req, qqmusic::utils::HttpResponse & resp, std::shared_ptr< boost::asio::ssl::context > ssl_ctx)

Public Static Functions Documentation

function handle_http_redirecting

static qqmusic::Task< qqmusic::Result< qqmusic::utils::HttpResponse > > handle_http_redirecting (
    qqmusic::utils::Session & self,
    boost::url_view url,
    boost::beast::http::request< boost::beast::http::string_body > & req,
    qqmusic::utils::HttpResponse & resp
) 

function handle_https_redirecting

static qqmusic::Task< qqmusic::Result< qqmusic::utils::HttpResponse > > handle_https_redirecting (
    qqmusic::utils::Session & self,
    boost::url_view url,
    boost::beast::http::request< boost::beast::http::string_body > & req,
    qqmusic::utils::HttpResponse & resp,
    std::shared_ptr< boost::asio::ssl::context > ssl_ctx
) 


The documentation for this class was generated from the following file src/utils/session.cc