forked from boostorg/beast
This eliminates beast::write output for dynamic buffers and replaces it with the function ostream() that wraps a caller provided dynamic buffer and returns the result as a std::ostream derived object. Callers may now produce formatted output into any object meeting the requirements of DynamicBuffer using operator<< and the standard stream modifiers such as std::endl. This new technique is more efficient, as implementations of operator<< can now write directly into the output using std::ostream::write and std::ostream::put. Example of use: beast::streambuf sb; beast::ostream(sb) << "Hello, world!" << std::endl;
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
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_CORE_HPP
|
|
#define BEAST_CORE_HPP
|
|
|
|
#include <beast/config.hpp>
|
|
|
|
#include <beast/core/async_completion.hpp>
|
|
#include <beast/core/bind_handler.hpp>
|
|
#include <beast/core/buffer_cat.hpp>
|
|
#include <beast/core/buffer_concepts.hpp>
|
|
#include <beast/core/buffers_adapter.hpp>
|
|
#include <beast/core/consuming_buffers.hpp>
|
|
#include <beast/core/dynabuf_readstream.hpp>
|
|
#include <beast/core/ostream.hpp>
|
|
#include <beast/core/error.hpp>
|
|
#include <beast/core/flat_streambuf.hpp>
|
|
#include <beast/core/handler_alloc.hpp>
|
|
#include <beast/core/handler_concepts.hpp>
|
|
#include <beast/core/handler_helpers.hpp>
|
|
#include <beast/core/handler_ptr.hpp>
|
|
#include <beast/core/placeholders.hpp>
|
|
#include <beast/core/prepare_buffers.hpp>
|
|
#include <beast/core/static_streambuf.hpp>
|
|
#include <beast/core/static_string.hpp>
|
|
#include <beast/core/stream_concepts.hpp>
|
|
#include <beast/core/streambuf.hpp>
|
|
#include <beast/core/to_string.hpp>
|
|
|
|
#endif
|