SMACC2
Loading...
Searching...
No Matches
cl_http::CpHttpSessionManager::ServerConfig Class Reference
Collaboration diagram for cl_http::CpHttpSessionManager::ServerConfig:
Collaboration graph

Public Member Functions

 ServerConfig (const std::string &server_name)
 
bool isSSL () const
 
std::string getPort () const
 
std::string getServerName () const
 

Private Attributes

std::string server_name_
 
bool ssl_
 

Detailed Description

Definition at line 60 of file cp_http_session_manager.hpp.

Constructor & Destructor Documentation

◆ ServerConfig()

cl_http::CpHttpSessionManager::ServerConfig::ServerConfig ( const std::string & server_name)
explicit

Definition at line 28 of file cp_http_session_manager.cpp.

29: server_name_(server_name), ssl_(true)
30{
31 if (!server_name_.substr(0, 7).compare("http://"))
32 {
33 ssl_ = false;
34 server_name_.erase(0, 7);
35 }
36 else if (!server_name_.substr(0, 8).compare("https://"))
37 {
38 server_name_.erase(0, 8);
39 ssl_ = true;
40 }
41}

References server_name_.

Member Function Documentation

◆ getPort()

std::string cl_http::CpHttpSessionManager::ServerConfig::getPort ( ) const
inline

Definition at line 66 of file cp_http_session_manager.hpp.

66{ return ssl_ ? "443" : "80"; }

References ssl_.

◆ getServerName()

std::string cl_http::CpHttpSessionManager::ServerConfig::getServerName ( ) const
inline

Definition at line 67 of file cp_http_session_manager.hpp.

67{ return server_name_; }

References server_name_.

◆ isSSL()

bool cl_http::CpHttpSessionManager::ServerConfig::isSSL ( ) const
inline

Definition at line 65 of file cp_http_session_manager.hpp.

65{ return ssl_; }

References ssl_.

Member Data Documentation

◆ server_name_

std::string cl_http::CpHttpSessionManager::ServerConfig::server_name_
private

Definition at line 70 of file cp_http_session_manager.hpp.

Referenced by getServerName(), and ServerConfig().

◆ ssl_

bool cl_http::CpHttpSessionManager::ServerConfig::ssl_
private

Definition at line 71 of file cp_http_session_manager.hpp.

Referenced by getPort(), and isSSL().


The documentation for this class was generated from the following files: