28 #ifndef WEBSOCKETPP_TRANSPORT_STUB_BASE_HPP 29 #define WEBSOCKETPP_TRANSPORT_STUB_BASE_HPP 31 #include <websocketpp/common/system_error.hpp> 32 #include <websocketpp/common/cpp11.hpp> 53 class category :
public lib::error_category {
57 char const * name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
58 return "websocketpp.transport.stub";
61 std::string message(
int value)
const {
64 return "Generic stub transport policy error";
66 return "feature not implemented";
81 return lib::error_code(
static_cast<
int>(e), get_category());
88 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
89 template<>
struct is_error_code_enum<websocketpp::transport::stub::error::value>
91 static bool const value =
true;
93 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
lib::error_code make_error_code(error::value e)
Get an error code with the given value and the stub transport category.
void handle_accept(connection_ptr con, lib::error_code const &ec)
Handler callback for start_accept.
Stub transport policy that has no input or output.
lib::error_category const & get_category()
Get a reference to a static copy of the stub transport error category.
lib::function< void(lib::error_code const &)> connect_handler
The type and signature of the callback passed to the connect method.