28 #ifndef WEBSOCKETPP_TRANSPORT_ASIO_SOCKET_BASE_HPP
29 #define WEBSOCKETPP_TRANSPORT_ASIO_SOCKET_BASE_HPP
31 #include <websocketpp/common/memory.hpp>
32 #include <websocketpp/common/functional.hpp>
33 #include <websocketpp/common/system_error.hpp>
34 #include <websocketpp/common/cpp11.hpp>
35 #include <websocketpp/common/connection_hdl.hpp>
37 #include <boost/asio.hpp>
108 const char *name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
109 return "websocketpp.transport.asio.socket";
112 std::string message(
int value)
const {
115 return "Security policy error";
117 return "Socket component error";
119 return "Invalid state";
121 return "Invalid or empty TLS context supplied";
123 return "TLS handshake timed out";
125 return "Pass through from socket policy";
127 return "Required tls_init handler not present.";
129 return "TLS handshake failed";
136 inline const lib::error_category& get_socket_category() {
141 inline lib::error_code make_error_code(
error::value e) {
142 return lib::error_code(static_cast<int>(e), get_socket_category());
146 typedef lib::function<void(const lib::error_code&)>
init_handler;
153 #endif // WEBSOCKETPP_TRANSPORT_ASIO_SOCKET_BASE_HPP
uint16_t value
The type of a close code value.
Error category related to asio transport socket policies.
Required tls_init handler not present.
pass_through from underlying library
A function was called in a state that it was illegal to do so.
Namespace for the WebSocket++ project.
lib::function< void(lib::error_code const &)> init_handler
The type and signature of the callback passed to the init hook.