Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/boost/corosio/acceptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <boost/corosio/endpoint.hpp>
#include <boost/corosio/socket.hpp>
#include <boost/capy/ex/executor_ref.hpp>
#include <boost/capy/io_awaitable.hpp>
#include <boost/capy/concept/io_awaitable.hpp>
#include <boost/capy/ex/execution_context.hpp>
#include <boost/capy/concept/executor.hpp>

Expand All @@ -28,7 +28,7 @@
#include <coroutine>
#include <cstddef>
#include <memory>
#include <stop_token>
#include <boost/capy/ex/stop_token.hpp>
#include <type_traits>

namespace boost {
Expand Down Expand Up @@ -68,7 +68,7 @@ class BOOST_COROSIO_DECL acceptor : public io_object
{
acceptor& acc_;
socket& peer_;
std::stop_token token_;
capy::stop_token token_;
mutable system::error_code ec_;
mutable io_object::io_object_impl* peer_impl_ = nullptr;

Expand Down Expand Up @@ -111,7 +111,7 @@ class BOOST_COROSIO_DECL acceptor : public io_object
auto await_suspend(
std::coroutine_handle<> h,
Ex const& ex,
std::stop_token token) -> std::coroutine_handle<>
capy::stop_token token) -> std::coroutine_handle<>
{
token_ = std::move(token);
acc_.get().accept(h, ex, token_, &ec_, &peer_impl_);
Expand Down Expand Up @@ -225,7 +225,7 @@ class BOOST_COROSIO_DECL acceptor : public io_object
socket with the new connection. The acceptor must be listening
before calling this function.

The operation supports cancellation via `std::stop_token` through
The operation supports cancellation via `capy::stop_token` through
the affine awaitable protocol. If the associated stop token is
triggered, the operation completes immediately with
`errc::operation_canceled`.
Expand Down Expand Up @@ -270,7 +270,7 @@ class BOOST_COROSIO_DECL acceptor : public io_object
virtual void accept(
std::coroutine_handle<>,
capy::executor_ref,
std::stop_token,
capy::stop_token,
system::error_code*,
io_object_impl**) = 0;
};
Expand Down
18 changes: 9 additions & 9 deletions include/boost/corosio/io_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <coroutine>
#include <cstddef>
#include <stop_token>
#include <boost/capy/ex/stop_token.hpp>

namespace boost {
namespace corosio {
Expand All @@ -33,7 +33,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
operation completes when at least one byte has been read, or
an error occurs.

The operation supports cancellation via `std::stop_token` through
The operation supports cancellation via `capy::stop_token` through
the affine awaitable protocol. If the associated stop token is
triggered, the operation completes immediately with
`errc::operation_canceled`.
Expand Down Expand Up @@ -68,7 +68,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
completes when at least one byte has been written, or an
error occurs.

The operation supports cancellation via `std::stop_token` through
The operation supports cancellation via `capy::stop_token` through
the affine awaitable protocol. If the associated stop token is
triggered, the operation completes immediately with
`errc::operation_canceled`.
Expand Down Expand Up @@ -100,7 +100,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
{
io_stream& ios_;
MutableBufferSequence buffers_;
std::stop_token token_;
capy::stop_token token_;
mutable system::error_code ec_;
mutable std::size_t bytes_transferred_ = 0;

Expand Down Expand Up @@ -137,7 +137,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
auto await_suspend(
std::coroutine_handle<> h,
Ex const& ex,
std::stop_token token) -> std::coroutine_handle<>
capy::stop_token token) -> std::coroutine_handle<>
{
token_ = std::move(token);
ios_.get().read_some(h, ex, buffers_, token_, &ec_, &bytes_transferred_);
Expand All @@ -150,7 +150,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
{
io_stream& ios_;
ConstBufferSequence buffers_;
std::stop_token token_;
capy::stop_token token_;
mutable system::error_code ec_;
mutable std::size_t bytes_transferred_ = 0;

Expand Down Expand Up @@ -187,7 +187,7 @@ class BOOST_COROSIO_DECL io_stream : public io_object
auto await_suspend(
std::coroutine_handle<> h,
Ex const& ex,
std::stop_token token) -> std::coroutine_handle<>
capy::stop_token token) -> std::coroutine_handle<>
{
token_ = std::move(token);
ios_.get().write_some(h, ex, buffers_, token_, &ec_, &bytes_transferred_);
Expand All @@ -202,15 +202,15 @@ class BOOST_COROSIO_DECL io_stream : public io_object
std::coroutine_handle<>,
capy::executor_ref,
io_buffer_param,
std::stop_token,
capy::stop_token,
system::error_code*,
std::size_t*) = 0;

virtual void write_some(
std::coroutine_handle<>,
capy::executor_ref,
io_buffer_param,
std::stop_token,
capy::stop_token,
system::error_code*,
std::size_t*) = 0;
};
Expand Down
6 changes: 3 additions & 3 deletions include/boost/corosio/read.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <coroutine>
#include <cstddef>
#include <stop_token>
#include <boost/capy/ex/stop_token.hpp>
#include <string>
#include <type_traits>

Expand All @@ -35,7 +35,7 @@ namespace corosio {
until the entire buffer sequence is filled, an error occurs, or
end-of-file is reached.

The operation supports cancellation via `std::stop_token` through
The operation supports cancellation via `capy::stop_token` through
the affine awaitable protocol. If the associated stop token is
triggered, the operation completes immediately with
`errc::operation_canceled`.
Expand Down Expand Up @@ -110,7 +110,7 @@ read(io_stream& ios, MB const& bs)
the string is resized to contain exactly the data read (plus any
original content).

The operation supports cancellation via `std::stop_token` through
The operation supports cancellation via `capy::stop_token` through
the affine awaitable protocol. If the associated stop token is
triggered, the operation completes immediately with
`errc::operation_canceled`.
Expand Down
10 changes: 5 additions & 5 deletions include/boost/corosio/resolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <boost/corosio/io_result.hpp>
#include <boost/corosio/resolver_results.hpp>
#include <boost/capy/ex/executor_ref.hpp>
#include <boost/capy/io_awaitable.hpp>
#include <boost/capy/concept/io_awaitable.hpp>
#include <boost/capy/ex/execution_context.hpp>
#include <boost/capy/concept/executor.hpp>

Expand All @@ -26,7 +26,7 @@
#include <concepts>
#include <coroutine>
#include <cstdint>
#include <stop_token>
#include <boost/capy/ex/stop_token.hpp>
#include <string>
#include <string_view>
#include <type_traits>
Expand Down Expand Up @@ -144,7 +144,7 @@ class BOOST_COROSIO_DECL resolver : public io_object
std::string host_;
std::string service_;
resolve_flags flags_;
std::stop_token token_;
capy::stop_token token_;
mutable system::error_code ec_;
mutable resolver_results results_;

Expand Down Expand Up @@ -185,7 +185,7 @@ class BOOST_COROSIO_DECL resolver : public io_object
auto await_suspend(
std::coroutine_handle<> h,
Ex const& ex,
std::stop_token token) -> std::coroutine_handle<>
capy::stop_token token) -> std::coroutine_handle<>
{
token_ = std::move(token);
r_.get().resolve(h, ex, host_, service_, flags_, token_, &ec_, &results_);
Expand Down Expand Up @@ -323,7 +323,7 @@ class BOOST_COROSIO_DECL resolver : public io_object
std::string_view host,
std::string_view service,
resolve_flags flags,
std::stop_token,
capy::stop_token,
system::error_code*,
resolver_results*) = 0;
};
Expand Down
Loading