diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4380d8a..c7e9824 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: - name: Setup vcpkg (it does not install any package yet) uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: 486a4640db740f5994e492eb60748111dfc48de7 + vcpkgGitCommitId: 01f602195983451bc83e72f4214af2cbc495aa94 - name: Get OpenCppCoverage if: ${{ matrix.BUILD_TYPE == 'Debug' }} @@ -48,8 +48,8 @@ jobs: - name: Upload Report to Codecov if: ${{ matrix.BUILD_TYPE == 'Debug' }} - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: files: ./cobertura.xml fail_ci_if_error: true - functionalities: fix \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} # required \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8daa53c..783a6ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ target_include_directories(winasio INTERFACE # header only target_compile_definitions(winasio - INTERFACE _WIN32_WINNT=0x0601 + INTERFACE _WIN32_WINNT=0x0602 # INTERFACE WINASIO_LOG=1 ) diff --git a/include/boost/winasio/named_pipe/named_pipe.hpp b/include/boost/winasio/named_pipe/named_pipe.hpp index 5f67358..3c75ae2 100644 --- a/include/boost/winasio/named_pipe/named_pipe.hpp +++ b/include/boost/winasio/named_pipe/named_pipe.hpp @@ -38,7 +38,7 @@ class named_pipe : public boost::asio::windows::basic_stream_handle { typedef std::string endpoint_type; typedef boost::asio::windows::basic_stream_handle parent_type; - named_pipe(executor_type &ex) + named_pipe(const executor_type &ex) : boost::asio::windows::basic_stream_handle(ex) {} template @@ -50,6 +50,10 @@ class named_pipe : public boost::asio::windows::basic_stream_handle { : boost::asio::windows::basic_stream_handle( context.get_executor()) {} + named_pipe(named_pipe &&other) + : boost::asio::windows::basic_stream_handle( + std::move(other)) {} + void server_create(boost::system::error_code &ec, endpoint_type const &endpoint) { const int bufsize = 512; @@ -127,7 +131,7 @@ class named_pipe : public boost::asio::windows::basic_stream_handle { // used for client to connect BOOST_ASIO_SYNC_OP_VOID connect(const endpoint_type &endpoint, boost::system::error_code &ec, - int timeout_ms = 20000) { + std::uint32_t timeout_ms = 20000) { if (boost::asio::windows::basic_stream_handle::is_open()) { boost::asio::windows::basic_stream_handle::close(); diff --git a/include/boost/winasio/named_pipe/named_pipe_client_details.hpp b/include/boost/winasio/named_pipe/named_pipe_client_details.hpp index b897dbc..d23eaa8 100644 --- a/include/boost/winasio/named_pipe/named_pipe_client_details.hpp +++ b/include/boost/winasio/named_pipe/named_pipe_client_details.hpp @@ -20,7 +20,8 @@ namespace details { // client connect to the namedpipe, // return the ok handle. Caller is responsible for freeing the handle. inline void client_connect(boost::system::error_code &ec, HANDLE &pipe_ret, - std::string const &endpoint, int timeout_ms) { + std::string const &endpoint, + std::uint32_t timeout_ms) { HANDLE hPipe; BOOL fSuccess = FALSE;