1010 *
1111 * Copyright (c) Thurman Gillespy
1212 * 2019-10-21
13+ *
14+ * Updated 2025-04-23 by Cliff Green for library dependency changes
1315 *
1416 * Distributed under the Boost Software License, Version 1.0.
1517 * (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,7 +37,7 @@ echo_binary_text_server_demo.cpp -lpthread -o echo_server
3537#include " net_ip/net_ip.hpp"
3638#include " net_ip/net_entity.hpp"
3739#include " net_ip_component/worker.hpp"
38- #include " marshall /extract_append.hpp"
40+ #include " serialize /extract_append.hpp"
3941#include " net_ip/io_type_decls.hpp"
4042
4143using io_context = asio::io_context;
@@ -107,7 +109,7 @@ int main(int argc, char* argv[]) {
107109 // endian correct data marshalling
108110 std::byte tbuf[HDR_SIZE]; // temp buffer to hold the header
109111 // write those 2 bytes to the temp buffer
110- std::size_t result = chops::append_val<uint16_t >(tbuf, size_val);
112+ std::size_t result = chops::append_val<std::endian::big, uint16_t >(tbuf, size_val);
111113 assert (result == HDR_SIZE);
112114 // now append our header and string data to the output buffer
113115 buf_out.append (tbuf, sizeof (tbuf)); // write the header
@@ -131,7 +133,7 @@ int main(int argc, char* argv[]) {
131133 hdr_processed = true ;
132134 // 1st 2 bytes is message size
133135 // endian correct data marshalling
134- uint16_t size = chops::extract_val<uint16_t >
136+ uint16_t size = chops::extract_val<std::endian::big, uint16_t >
135137 (static_cast <std::byte*> (buf.data ()));
136138
137139 return size; // return the size of the text data (obtained from header)
0 commit comments