Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::TLS::Server_Information Class Reference

`#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

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) {}

Botan::TLS::Server_Information::Server_Information | ( | const std::string & | hostname,
|  | uint16_t | port = `0`
| ) |  |
| inline

Parameters

  hostname | the host's DNS name, if known
  port | specifies 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) {}
Botan::TLS::Server_Information::port
uint16_t port() const
Definition: tls_server_info.h:64
Botan::TLS::Server_Information::hostname
std::string hostname() const
Definition: tls_server_info.h:53

Botan::TLS::Server_Information::Server_Information | ( | const std::string & | hostname,
|  | const std::string & | service,
|  | uint16_t | port = `0`
| ) |  |
| inline

Parameters

  hostname | the host's DNS name, if known
  service | is a text string of the service type (eg "https", "tor", or "git")
  port | specifies 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) {}
Botan::TLS::Server_Information::service
std::string service() const
Definition: tls_server_info.h:59
Botan::TLS::Server_Information::port
uint16_t port() const
Definition: tls_server_info.h:64
Botan::TLS::Server_Information::hostname
std::string hostname() const
Definition: tls_server_info.h:53

## Member Function Documentation

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(); }

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

Returns
  the host's DNS name, if known

Definition at line 53 of file tls_server_info.h.

Referenced by Botan::TLS::Client_Hello::Client_Hello(), 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().

53 { return m_hostname; }

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; }

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:

- src/lib/tls/tls_server_info.h