Skip to content

Commit

Permalink
error types are in system
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Mar 14, 2024
1 parent 8617b2f commit 308a57c
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 87 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BO
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "http_io" FILES ${BOOST_HTTP_IO_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES Jamfile)

add_library(boost_http_io ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES})
add_library(boost_http_io ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES} build/Jamfile)
target_link_libraries(boost_http_io PUBLIC Threads::Threads)
add_library(Boost::http_io ALIAS boost_http_io)
boost_http_io_setup_properties(boost_http_io)
Expand Down
2 changes: 1 addition & 1 deletion build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ project boost/http_io

alias http_io_sources
:
src.cpp
detail/except.cpp
;

explicit http_io_sources ;
Expand Down
2 changes: 1 addition & 1 deletion example/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class worker
do_accept()
{
// Clean up any previous connection.
io::error_code ec;
system::error_code ec;
sock_.close(ec);
pr_.reset();

Expand Down
1 change: 0 additions & 1 deletion include/boost/http_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#ifndef BOOST_HTTP_IO_HPP
#define BOOST_HTTP_IO_HPP

#include <boost/http_io/error.hpp>
#include <boost/http_io/read.hpp>
#include <boost/http_io/write.hpp>

Expand Down
27 changes: 0 additions & 27 deletions include/boost/http_io/error.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/boost/http_io/impl/read.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class read_body_op
void
operator()(
Self& self,
error_code ec = {},
system::error_code ec = {},
std::size_t bytes_transferred = 0)
{
BOOST_ASIO_CORO_REENTER(*this)
Expand Down
29 changes: 15 additions & 14 deletions include/boost/http_io/impl/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
#ifndef BOOST_HTTP_IO_IMPL_WRITE_HPP
#define BOOST_HTTP_IO_IMPL_WRITE_HPP

#include <boost/http_io/error.hpp>
#include <boost/asio/append.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/compose.hpp>
#include <boost/asio/coroutine.hpp>
#include <boost/asio/post.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/result.hpp>
#include <iterator>

namespace boost {
Expand Down Expand Up @@ -53,11 +54,11 @@ class write_some_op
void
operator()(
Self& self,
error_code ec,
system::error_code ec,
std::size_t bytes_transferred,
bool do_post = false)
{
urls::result<buffers_type> rv;
system::result<buffers_type> rv;

BOOST_ASIO_CORO_REENTER(*this)
{
Expand Down Expand Up @@ -123,7 +124,7 @@ class write_op
void
operator()(
Self& self,
error_code ec = {},
system::error_code ec = {},
std::size_t bytes_transferred = 0)
{
BOOST_ASIO_CORO_REENTER(*this)
Expand Down Expand Up @@ -183,7 +184,7 @@ class relay_some_op
void
operator()(
Self& self,
error_code ec = {},
system::error_code ec = {},
std::size_t bytes_transferred = 0)
{
urls::result<
Expand Down Expand Up @@ -234,17 +235,17 @@ class relay_some_op
template<
class AsyncWriteStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_write_some(
AsyncWriteStream& dest,
http_proto::serializer& sr,
CompletionToken&& token)
{
return asio::async_compose<
CompletionToken,
void(error_code, std::size_t)>(
void(system::error_code, std::size_t)>(
detail::write_some_op<
AsyncWriteStream>{dest, sr},
token, dest);
Expand All @@ -253,17 +254,17 @@ async_write_some(
template<
class AsyncWriteStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_write(
AsyncWriteStream& dest,
http_proto::serializer& sr,
CompletionToken&& token)
{
return asio::async_compose<
CompletionToken,
void(error_code, std::size_t)>(
void(system::error_code, std::size_t)>(
detail::write_op<
AsyncWriteStream>{dest, sr},
token,
Expand All @@ -276,9 +277,9 @@ template<
class AsyncReadStream,
class CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_relay_some(
AsyncWriteStream& dest,
AsyncReadStream& src,
Expand All @@ -288,7 +289,7 @@ async_relay_some(
{
return asio::async_compose<
CompletionToken,
void(error_code, std::size_t)>(
void(system::error_code, std::size_t)>(
detail::relay_some_op<
AsyncWriteStream,
AsyncReadStream,
Expand Down
2 changes: 1 addition & 1 deletion include/boost/http_io/read.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#define BOOST_HTTP_IO_READ_HPP

#include <boost/http_io/detail/config.hpp>
#include <boost/http_io/error.hpp>
#include <boost/http_proto/request_parser.hpp>
#include <boost/http_proto/response_parser.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/result.hpp>
#include <cstdint>

Expand Down
14 changes: 7 additions & 7 deletions include/boost/http_io/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#define BOOST_HTTP_IO_WRITE_HPP

#include <boost/http_io/detail/config.hpp>
#include <boost/http_io/error.hpp>
#include <boost/http_proto/serializer.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/system/error_code.hpp>

namespace boost {
namespace http_io {
Expand All @@ -23,9 +23,9 @@ namespace http_io {
template<
class AsyncWriteStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_write_some(
AsyncWriteStream& dest,
http_proto::serializer& sr,
Expand All @@ -36,9 +36,9 @@ async_write_some(
template<
class AsyncWriteStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_write(
AsyncWriteStream& dest,
http_proto::serializer& sr,
Expand All @@ -52,9 +52,9 @@ template<
class AsyncReadStream,
class CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(
void(error_code, std::size_t)) CompletionToken>
void(system::error_code, std::size_t)) CompletionToken>
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
void (error_code, std::size_t))
void (system::error_code, std::size_t))
async_relay_some(
AsyncWriteStream& dest,
AsyncReadStream& src,
Expand Down
3 changes: 1 addition & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ set(EXTRAFILES

set(PFILES
CMakeLists.txt
#Jamfile
Jamfile
buffer.cpp
error.cpp
read.cpp
sandbox.cpp
write.cpp
Expand Down
1 change: 0 additions & 1 deletion test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ project
;

local SOURCES =
error.cpp
read.cpp
sandbox.cpp
write.cpp
Expand Down
30 changes: 0 additions & 30 deletions test/error.cpp

This file was deleted.

0 comments on commit 308a57c

Please sign in to comment.