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/memory.hpp>
35 #include <websocketpp/common/system_error.hpp>
113 namespace transport {
119 typedef lib::function<void(lib::error_code const &,size_t)>
read_handler;
138 buffer(
char const * b,
size_t l) : buf(b),len(l) {}
186 char const * name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
187 return "websocketpp.transport";
190 std::string message(
int value)
const {
193 return "Generic transport policy error";
195 return "Underlying Transport Error";
197 return "async_read_at_least call requested more bytes than buffer can store";
199 return "The operation was aborted";
201 return "The operation is not supported by this transport";
203 return "End of File";
205 return "TLS Short Read";
207 return "Timer Expired";
209 return "A transport action was requested after shutdown";
211 return "Generic TLS related error";
218 inline lib::error_category
const & get_category() {
223 inline lib::error_code make_error_code(
error::value e) {
224 return lib::error_code(static_cast<int>(e), get_category());
230 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
233 static bool const value =
true;
235 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
237 #endif // WEBSOCKETPP_TRANSPORT_BASE_CON_HPP
uint16_t value
The type of a close code value.
async_read_at_least call requested more bytes than buffer can store
lib::function< void(lib::error_code const &)> write_handler
The type and signature of the callback passed to the write 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 &, size_t)> read_handler
The type and signature of the callback passed to the read method.
underlying transport pass through
lib::function< void()> dispatch_handler
The type and signature of the callback passed to the dispatch method.
async_read called while another async_read was in progress
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 &)> shutdown_handler
The type and signature of the callback passed to the shutdown method.
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.
A simple utility buffer class.
read or write after shutdown