2017-07-20 08:01:46 -07:00
|
|
|
//
|
|
|
|
// Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
|
|
|
|
//
|
|
|
|
// 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)
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BEAST_WEBSOCKET_ERROR_HPP
|
|
|
|
#define BEAST_WEBSOCKET_ERROR_HPP
|
|
|
|
|
2016-05-07 14:57:15 -04:00
|
|
|
#include <beast/core/error.hpp>
|
2017-07-20 08:01:46 -07:00
|
|
|
|
|
|
|
namespace beast {
|
|
|
|
namespace websocket {
|
|
|
|
|
2016-10-15 21:39:24 -04:00
|
|
|
/// Error codes returned from @ref beast::websocket::stream operations.
|
2017-07-20 08:01:46 -07:00
|
|
|
enum class error
|
|
|
|
{
|
|
|
|
/// Both sides performed a WebSocket close
|
2016-10-04 18:00:11 -04:00
|
|
|
closed = 1,
|
2017-07-20 08:01:46 -07:00
|
|
|
|
|
|
|
/// WebSocket connection failed, protocol violation
|
|
|
|
failed,
|
|
|
|
|
|
|
|
/// Upgrade request failed, connection is closed
|
|
|
|
handshake_failed,
|
|
|
|
|
|
|
|
/// Upgrade request failed, but connection is still open
|
|
|
|
keep_alive,
|
|
|
|
|
|
|
|
/// HTTP response is malformed
|
|
|
|
response_malformed,
|
|
|
|
|
|
|
|
/// HTTP response failed the upgrade
|
|
|
|
response_failed,
|
|
|
|
|
|
|
|
/// Upgrade request denied for invalid fields.
|
|
|
|
response_denied,
|
|
|
|
|
|
|
|
/// Upgrade request is malformed
|
|
|
|
request_malformed,
|
|
|
|
|
|
|
|
/// Upgrade request fields incorrect
|
|
|
|
request_invalid,
|
|
|
|
|
|
|
|
/// Upgrade request denied
|
2016-05-07 17:06:46 -04:00
|
|
|
request_denied,
|
|
|
|
|
|
|
|
/// General WebSocket error
|
|
|
|
general
|
2017-07-20 08:01:46 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // websocket
|
|
|
|
} // beast
|
|
|
|
|
|
|
|
#include <beast/websocket/impl/error.ipp>
|
|
|
|
|
|
|
|
#endif
|