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> 114 namespace transport {
120 typedef 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";
197 case invalid_num_bytes:
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";
219 inline lib::error_category
const & get_category() {
224 inline lib::error_code make_error_code(
error::value e) {
225 return lib::error_code(static_cast<int>(e), get_category());
231 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
234 static bool const value =
true;
236 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
238 #endif // WEBSOCKETPP_TRANSPORT_BASE_CON_HPP
uint16_t value
The type of a close code value.
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.
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