forked from boostorg/beast
The websocket stream is optimized to contain a small circular static buffer, reducing the number of I/O calls when reading data. The size of the buffer is tuned for maximum performance with TCP/IP and no long needs configuration: * read_some replaces read_frame * write_some replaces write_Frame * async_read_some replaces async_read_frame * async_write_some replaces async_write_frame * websocket::stream::read_buffer_size is removed Actions Required: * Remove calls websocket::stream::read_buffer_size * Use read_some and write_some instead of read_frame and write_frame
39 lines
815 B
C++
39 lines
815 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,
|
|
|
|
/// buffer overflow
|
|
buffer_overflow
|
|
};
|
|
|
|
} // websocket
|
|
} // beast
|
|
|
|
#include <beast/websocket/impl/error.ipp>
|
|
|
|
#endif
|