Botan 3.4.0
Crypto and TLS for C&
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 (std::string_view hostname, std::string_view service, uint16_t port=0)
 
 Server_Information (std::string_view hostname, uint16_t port=0)
 
std::string service () const
 

Detailed Description

Represents information known about a TLS server.

Definition at line 19 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 24 of file tls_server_info.h.

24: m_hostname(), m_service(), m_port(0) {}

◆ Server_Information() [2/3]

Botan::TLS::Server_Information::Server_Information ( std::string_view 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 31 of file tls_server_info.h.

31 :
32 m_hostname(hostname), m_service(), m_port(port) {}

◆ Server_Information() [3/3]

Botan::TLS::Server_Information::Server_Information ( std::string_view hostname,
std::string_view 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 41 of file tls_server_info.h.

41 :
42 m_hostname(hostname), m_service(service), m_port(port) {}

Member Function Documentation

◆ empty()

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

Definition at line 63 of file tls_server_info.h.

63{ 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 58 of file tls_server_info.h.

58{ return m_port; }

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

◆ 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 53 of file tls_server_info.h.

53{ return m_service; }

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


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