Files
boost_beast/include/boost/beast/websocket/impl/error.ipp

40 lines
1.0 KiB
Plaintext
Raw Normal View History

2017-07-20 08:01:46 -07:00
//
2017-07-24 09:42:36 -07:00
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
2017-07-20 08:01:46 -07:00
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
2017-07-20 13:40:34 -07:00
// Official repository: https://github.com/boostorg/beast
//
2017-07-20 08:01:46 -07:00
2017-07-20 13:40:34 -07:00
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_ERROR_IPP
#define BOOST_BEAST_WEBSOCKET_IMPL_ERROR_IPP
2017-07-20 08:01:46 -07:00
namespace boost {
2017-07-20 08:01:46 -07:00
namespace beast {
namespace websocket {
namespace detail {
template<class>
string_view
error_codes::
get_message(error ev) const
{
switch(ev)
{
default:
case error::failed: return "WebSocket connection failed due to a protocol violation";
case error::closed: return "WebSocket connection closed normally";
case error::handshake_failed: return "WebSocket upgrade handshake failed";
case error::buffer_overflow: return "WebSocket dynamic buffer overflow";
case error::partial_deflate_block: return "WebSocket partial deflate block";
}
}
} // detail
2017-07-20 08:01:46 -07:00
} // websocket
} // beast
2017-07-20 13:40:34 -07:00
} // boost
2017-07-20 08:01:46 -07:00
#endif