24#ifndef ROUTING_PROTOCOL_INCLUDED
25#define ROUTING_PROTOCOL_INCLUDED
43 if (
name ==
"classic") {
45 }
else if (
name ==
"x") {
48 throw std::invalid_argument(
"Invalid protocol name: '" +
name +
"'");
67 throw std::invalid_argument(
"Invalid protocol: " +
Type
supported protocols
Definition: base_protocol.h:31
Definition: protocol.h:32
static Type get_by_name(const std::string &name)
Returns type of the protocol by its name.
Definition: protocol.h:40
static Type get_default()
Definition: protocol.h:36
virtual enum enum_protocol_type type() const =0
static constexpr uint16_t kXProtocolDefaultPort
Definition: protocol.h:77
static constexpr uint16_t kClassicProtocolDefaultPort
default server ports for supported protocols
Definition: protocol.h:76
static uint16_t get_default_port(Type type)
Returns default port for the selected protocol.
Definition: protocol.h:56
static std::string to_string(const LEX_STRING &str)
Definition: lex_string.h:49
struct result result
Definition: result.h:33
case opt name
Definition: sslopt-case.h:32