Shared Buffer
Loading...
Searching...
No Matches
shared_buffer_example.cpp File Reference

Example code demonstrating use of chops::shared_buffer. See threaded_wait_shared_demo.cpp for multithreaded example. More...

#include <iostream>
#include <cstdlib>
#include <cstddef>
#include <cstdint>
#include <string>
#include <cstring>
#include <ranges>
#include "serialize/extract_append.hpp"
#include "buffer/shared_buffer.hpp"
Include dependency graph for shared_buffer_example.cpp:

Functions

template<class C >
const char * cast_to_char_ptr (const C &buf)
 
template<class C >
const std::uint16_t * cast_to_uint16_ptr (const C &buf)
 
int main ()
 

Variables

constexpr auto printLn = [] () { std::cout << std::endl; }
 

Detailed Description

Example code demonstrating use of chops::shared_buffer. See threaded_wait_shared_demo.cpp for multithreaded example.

Author
Thurman Gillespy

Minor changes 4/3/2025 by Cliff Green (change repeat to iota, append now has endian flag).

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Sample make file: g++ -std=c++17 -I ~/Projects/utility-rack/include/ \ -I ~/Projects/boost_1_69_0/ \ shared_buffer_demo.cpp