1515
1616#define BOOST_ASIO_NO_DEPRECATED
1717#include " cancellation.h"
18- #include < boost/ asio/basic_stream_socket.hpp>
19- #include < boost/ asio/io_context.hpp>
20- #include < boost/ asio/ip/tcp.hpp>
18+ #include < asio/basic_stream_socket.hpp>
19+ #include < asio/io_context.hpp>
20+ #include < asio/ip/tcp.hpp>
2121#include < exception>
2222#include < streambuf>
2323
24- namespace asio = lslboost::asio;
25- using lslboost::system::error_code;
2624using asio::io_context;
2725
2826namespace lsl {
@@ -73,7 +71,7 @@ class cancellable_streambuf : public std::streambuf,
7371
7472 init_buffers ();
7573 socket ().close (ec_);
76- socket ().async_connect (endpoint, [this ](const error_code &ec) { this ->ec_ = ec; });
74+ socket ().async_connect (endpoint, [this ](const asio:: error_code &ec) { this ->ec_ = ec; });
7775 this ->as_context ().restart ();
7876 }
7977 ec_ = asio::error::would_block;
@@ -98,7 +96,7 @@ class cancellable_streambuf : public std::streambuf,
9896 * @return An \c error_code corresponding to the last error from the stream
9997 * buffer.
10098 */
101- const error_code &error () const { return ec_; }
99+ const asio:: error_code &error () const { return ec_; }
102100
103101protected:
104102 // / Close the socket if it's open.
@@ -131,7 +129,7 @@ class cancellable_streambuf : public std::streambuf,
131129 std::size_t bytes_transferred_;
132130 socket ().async_receive (asio::buffer (asio::buffer (get_buffer_) + putback_max),
133131 [this , &bytes_transferred_](
134- const error_code &ec, std::size_t bytes_transferred = 0 ) {
132+ const asio:: error_code &ec, std::size_t bytes_transferred = 0 ) {
135133 this ->ec_ = ec;
136134 bytes_transferred_ = bytes_transferred;
137135 });
@@ -155,7 +153,7 @@ class cancellable_streambuf : public std::streambuf,
155153 while (asio::buffer_size (buffer) > 0 ) {
156154 std::size_t bytes_transferred_;
157155 socket ().async_send (asio::buffer (buffer),
158- [this , &bytes_transferred_](const error_code &ec, std::size_t bytes_transferred) {
156+ [this , &bytes_transferred_](const asio:: error_code &ec, std::size_t bytes_transferred) {
159157 this ->ec_ = ec;
160158 bytes_transferred_ = bytes_transferred;
161159 });
@@ -192,7 +190,7 @@ class cancellable_streambuf : public std::streambuf,
192190 enum { putback_max = 8 };
193191 enum { buffer_size = 512 };
194192 char get_buffer_[buffer_size], put_buffer_[buffer_size];
195- error_code ec_;
193+ asio:: error_code ec_;
196194 std::atomic<bool > cancel_issued_{false };
197195 bool cancel_started_{false };
198196 std::recursive_mutex cancel_mut_;
0 commit comments