forked from boostorg/beast
fix #325 This removes unused and misleading handshake error codes. All semantic handshake failures are now reported using the same code, error::handshake_failed. Errors originating from stream operations still use the underlying stream error codes (for example: boost::asio::error::connection_reset).
36 lines
769 B
C++
36 lines
769 B
C++
//
|
|
// Copyright (c) 2013-2017 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
|
|
|
|
#include <beast/config.hpp>
|
|
#include <beast/core/error.hpp>
|
|
|
|
namespace beast {
|
|
namespace websocket {
|
|
|
|
/// Error codes returned from @ref beast::websocket::stream operations.
|
|
enum class error
|
|
{
|
|
/// Both sides performed a WebSocket close
|
|
closed = 1,
|
|
|
|
/// WebSocket connection failed, protocol violation
|
|
failed,
|
|
|
|
/// Upgrade handshake failed
|
|
handshake_failed
|
|
};
|
|
|
|
} // websocket
|
|
} // beast
|
|
|
|
#include <beast/websocket/impl/error.ipp>
|
|
|
|
#endif
|