Botan  2.8.0
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::TLS::Server_Information Class Referencefinal

#include <tls_server_info.h>

Public Member Functions

bool empty () const
 
std::string hostname () const
 
uint16_t port () const
 
 Server_Information ()
 
 Server_Information (const std::string &hostname, uint16_t port=0)
 
 Server_Information (const std::string &hostname, const std::string &service, uint16_t port=0)
 
std::string service () const
 

Detailed Description

Represents information known about a TLS server.

Definition at line 21 of file tls_server_info.h.

Constructor & Destructor Documentation

◆ Server_Information() [1/3]

Botan::TLS::Server_Information::Server_Information ( )
inline

An empty server info - nothing known

Definition at line 27 of file tls_server_info.h.

27 : m_hostname(""), m_service(""), m_port(0) {}

◆ Server_Information() [2/3]

Botan::TLS::Server_Information::Server_Information ( const std::string &  hostname,
uint16_t  port = 0 
)
inline
Parameters
hostnamethe host's DNS name, if known
portspecifies the protocol port of the server (eg for TCP/UDP). Zero represents unknown.

Definition at line 34 of file tls_server_info.h.

35  :
36  m_hostname(hostname), m_service(""), m_port(port) {}
std::string hostname() const

◆ Server_Information() [3/3]

Botan::TLS::Server_Information::Server_Information ( const std::string &  hostname,
const std::string &  service,
uint16_t  port = 0 
)
inline
Parameters
hostnamethe host's DNS name, if known
serviceis a text string of the service type (eg "https", "tor", or "git")
portspecifies the protocol port of the server (eg for TCP/UDP). Zero represents unknown.

Definition at line 45 of file tls_server_info.h.

47  :
48  m_hostname(hostname), m_service(service), m_port(port) {}
std::string hostname() const

Member Function Documentation

◆ empty()

bool Botan::TLS::Server_Information::empty ( ) const
inline
Returns
whether the hostname is known

Definition at line 69 of file tls_server_info.h.

Referenced by Botan::TLS::Session_Manager_In_Memory::save().

69 { return m_hostname.empty(); }

◆ hostname()

std::string Botan::TLS::Server_Information::hostname ( ) const
inline

◆ port()

uint16_t Botan::TLS::Server_Information::port ( ) const
inline
Returns
the protocol port of the server, or zero if unknown

Definition at line 64 of file tls_server_info.h.

Referenced by Botan::TLS::Session::DER_encode(), Botan::TLS::Session_Manager_SQL::load_from_server_info(), Botan::TLS::operator<(), Botan::TLS::operator==(), and Botan::TLS::Session_Manager_SQL::save().

64 { return m_port; }

◆ service()

std::string Botan::TLS::Server_Information::service ( ) const
inline
Returns
text string of the service type, e.g., "https", "tor", or "git"

Definition at line 59 of file tls_server_info.h.

Referenced by Botan::TLS::Session::DER_encode(), Botan::TLS::operator<(), and Botan::TLS::operator==().

59 { return m_service; }

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