28#ifndef WEBSOCKETPP_TRANSPORT_BASE_CON_HPP
29#define WEBSOCKETPP_TRANSPORT_BASE_CON_HPP
31#include <websocketpp/common/cpp11.hpp>
32#include <websocketpp/common/connection_hdl.hpp>
33#include <websocketpp/common/functional.hpp>
34#include <websocketpp/common/system_error.hpp>
120typedef lib::function<void(lib::error_code
const &,
size_t)>
read_handler;
139 buffer(
char const * b,
size_t l) : buf(b),len(l) {}
187 char const * name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
188 return "websocketpp.transport";
191 std::string message(
int value)
const {
194 return "Generic transport policy error";
196 return "Underlying Transport Error";
198 return "async_read_at_least call requested more bytes than buffer can store";
200 return "The operation was aborted";
202 return "The operation is not supported by this transport";
204 return "End of File";
206 return "TLS Short Read";
208 return "Timer Expired";
210 return "A transport action was requested after shutdown";
212 return "Generic TLS related error";
219inline lib::error_category
const & get_category() {
225 return lib::error_code(
static_cast<int>(e), get_category());
231_WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
232template<>
struct is_error_code_enum<
websocketpp::transport::error::value>
234 static bool const value =
true;
236_WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
@ pass_through
underlying transport pass through
@ operation_not_supported
Operation not supported.
@ operation_aborted
Operation aborted.
@ tls_error
Other TLS error.
@ invalid_num_bytes
async_read_at_least call requested more bytes than buffer can store
@ action_after_shutdown
read or write after shutdown
@ tls_short_read
TLS short read.
@ double_read
async_read called while another async_read was in progress
lib::function< void(lib::error_code const &, size_t)> read_handler
The type and signature of the callback passed to the read method.
lib::function< void()> dispatch_handler
The type and signature of the callback passed to the dispatch method.
lib::function< void()> interrupt_handler
The type and signature of the callback passed to the interrupt method.
lib::function< void(lib::error_code const &)> timer_handler
The type and signature of the callback passed to the read method.
lib::function< void(lib::error_code const &)> write_handler
The type and signature of the callback passed to the write method.
lib::function< void(lib::error_code const &)> init_handler
The type and signature of the callback passed to the init hook.
lib::function< void(lib::error_code const &)> shutdown_handler
The type and signature of the callback passed to the shutdown method.
Namespace for the WebSocket++ project.
A simple utility buffer class.