12#ifndef OPENVPN_CLIENT_CLIHALT_H
13#define OPENVPN_CLIENT_CLIHALT_H
47 throw client_halt_error();
52 size_t reason_pos = 0;
58 reason_ = sl[1].substr(reason_pos);
91 std::ostringstream
os;
100 Split::by_char_void<StringList, NullLex, Split::NullLimit>(sl,
msg,
',', 0, 1);
105 return sl.size() >= 1 && sl[0] ==
"HALT";
110 return sl.size() >= 1 && sl[0] ==
"RESTART";
std::string render() const
static bool match(const std::string &msg)
const std::string & reason() const
static bool is_halt(const StringList &sl)
static bool is_restart(const StringList &sl)
ClientHalt(const std::string &msg, const bool unicode_filter)
OPENVPN_SIMPLE_EXCEPTION(client_halt_error)
static void parse_msg(StringList &sl, const std::string &msg)
std::vector< std::string > StringList
STRING utf8_printable(const STRING &str, size_t max_len_flags)
bool starts_with(const STRING &str, const std::string &prefix)