diff --git a/CMakeLists.txt b/CMakeLists.txt index 19c6e3c..3dc4bb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.24) -project(native_streaming VERSION 1.0.17 LANGUAGES CXX) +project(native_streaming VERSION 1.0.18 LANGUAGES CXX) if (NOT CMAKE_MESSAGE_CONTEXT) set(CMAKE_MESSAGE_CONTEXT ${PROJECT_NAME}) diff --git a/LICENSE.txt b/LICENSE.txt index e73eafb..f5592a4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/async_reader.hpp b/include/native_streaming/async_reader.hpp index 5846cf6..8f756bf 100644 --- a/include/native_streaming/async_reader.hpp +++ b/include/native_streaming/async_reader.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/async_writer.hpp b/include/native_streaming/async_writer.hpp index d32e30e..ef51cac 100644 --- a/include/native_streaming/async_writer.hpp +++ b/include/native_streaming/async_writer.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/authentication.hpp b/include/native_streaming/authentication.hpp index 9feff02..3918f4a 100644 --- a/include/native_streaming/authentication.hpp +++ b/include/native_streaming/authentication.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/client.hpp b/include/native_streaming/client.hpp index 7e339fb..8234794 100644 --- a/include/native_streaming/client.hpp +++ b/include/native_streaming/client.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ class Client : public std::enable_shared_from_this /// @return pointer to created Session object std::shared_ptr createSession(std::shared_ptr wsStream, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber); + const uint16_t& endpointPortNumber); /// async operations handler std::shared_ptr ioContextPtr; diff --git a/include/native_streaming/common.hpp b/include/native_streaming/common.hpp index c59730f..c0f946f 100644 --- a/include/native_streaming/common.hpp +++ b/include/native_streaming/common.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/logging.hpp b/include/native_streaming/logging.hpp index d338dfd..f1c46ec 100644 --- a/include/native_streaming/logging.hpp +++ b/include/native_streaming/logging.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/server.hpp b/include/native_streaming/server.hpp index d845996..a14f007 100644 --- a/include/native_streaming/server.hpp +++ b/include/native_streaming/server.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,7 +89,7 @@ class Server : public std::enable_shared_from_this std::shared_ptr createSession(std::shared_ptr wsStream, const std::shared_ptr& userContext, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber); + const uint16_t& endpointPortNumber); /// async operations handler std::shared_ptr ioContextPtr; diff --git a/include/native_streaming/session.hpp b/include/native_streaming/session.hpp index 9d32829..5520419 100644 --- a/include/native_streaming/session.hpp +++ b/include/native_streaming/session.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ class Session : public std::enable_shared_from_this boost::beast::role_type role, LogCallback logCallback, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber); + const uint16_t& endpointPortNumber); ~Session(); Session(const Session&) = delete; @@ -79,7 +79,7 @@ class Session : public std::enable_shared_from_this std::string getEndpointAddress(); /// @brief returns a port number of the connection endpoint associated with the session. - boost::asio::ip::port_type getEndpointPortNumber(); + uint16_t getEndpointPortNumber(); /// @brief sets a callback to be called when the write operation has not been scheduled due to a timeout reached /// @param writeTaskTimeoutHandler callback @@ -130,7 +130,7 @@ class Session : public std::enable_shared_from_this std::string endpointAddress; /// @brief port number of the connection endpoint associated with the session - boost::asio::ip::port_type endpointPortNumber; + uint16_t endpointPortNumber; }; END_NAMESPACE_NATIVE_STREAMING diff --git a/include/native_streaming/utils/base64.hpp b/include/native_streaming/utils/base64.hpp index 0b8f578..c5ce478 100644 --- a/include/native_streaming/utils/base64.hpp +++ b/include/native_streaming/utils/base64.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/native_streaming/utils/boost_compatibility_utils.hpp b/include/native_streaming/utils/boost_compatibility_utils.hpp index ce4b05a..e2bbfc8 100644 --- a/include/native_streaming/utils/boost_compatibility_utils.hpp +++ b/include/native_streaming/utils/boost_compatibility_utils.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/client.cpp b/src/client.cpp index 8d85c4d..441f83f 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -157,7 +157,7 @@ void Client::onUpgradeConnection(const boost::system::error_code& ec, std::share } std::string endpointAddress; - boost::asio::ip::port_type endpointPortNumber; + uint16_t endpointPortNumber; try { auto remoteEp = wsStream->next_layer().socket().remote_endpoint(); @@ -175,7 +175,7 @@ void Client::onUpgradeConnection(const boost::system::error_code& ec, std::share std::shared_ptr Client::createSession(std::shared_ptr wsStream, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber) + const uint16_t& endpointPortNumber) { websocketStream.reset(); return std::make_shared(ioContextPtr, wsStream, nullptr, boost::beast::role_type::client, logCallback, endpointAddress, endpointPortNumber); diff --git a/src/server.cpp b/src/server.cpp index 679bda0..a41705d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -213,7 +213,7 @@ void Server::onUpgradeConnection(const boost::system::error_code& ec, // it throws an exception when attempting to retrieve the endpoint address. // To handle this, first verify the socket state and then safely attempt to retrieve the endpoint name. std::string endpointAddress; - boost::asio::ip::port_type endpointPortNumber; + uint16_t endpointPortNumber; if (!(wsStream->is_open() && wsStream->next_layer().socket().is_open())) { NS_LOG_W("Websocket connection aborted: the socket is already closed"); @@ -241,7 +241,7 @@ void Server::onUpgradeConnection(const boost::system::error_code& ec, std::shared_ptr Server::createSession(std::shared_ptr wsStream, const std::shared_ptr& userContext, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber) + const uint16_t& endpointPortNumber) { return std::make_shared(ioContextPtr, wsStream, userContext, boost::beast::role_type::server, logCallback, endpointAddress, endpointPortNumber); } diff --git a/src/session.cpp b/src/session.cpp index c0da1e3..7991993 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -11,7 +11,7 @@ Session::Session(std::shared_ptr ioContextPtr, boost::beast::role_type role, LogCallback logCallback, const std::string& endpointAddress, - const boost::asio::ip::port_type& endpointPortNumber) + const uint16_t& endpointPortNumber) : role(role) , logCallback(logCallback) , ioContextPtr(ioContextPtr) @@ -180,7 +180,7 @@ std::string Session::getEndpointAddress() return endpointAddress; } -boost::asio::ip::port_type Session::getEndpointPortNumber() +uint16_t Session::getEndpointPortNumber() { return endpointPortNumber; } diff --git a/test/test_base.hpp b/test/test_base.hpp index 3904506..b5fec21 100644 --- a/test/test_base.hpp +++ b/test/test_base.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/test/test_connection.hpp b/test/test_connection.hpp index 969444f..1013702 100644 --- a/test/test_connection.hpp +++ b/test/test_connection.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tools/license-header-checker/do-license-header-check.sh b/tools/license-header-checker/do-license-header-check.sh index 87bdbe1..8d3bba9 100755 --- a/tools/license-header-checker/do-license-header-check.sh +++ b/tools/license-header-checker/do-license-header-check.sh @@ -2,7 +2,7 @@ : ' /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tools/license-header-checker/license.in b/tools/license-header-checker/license.in index e73eafb..f5592a4 100644 --- a/tools/license-header-checker/license.in +++ b/tools/license-header-checker/license.in @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 openDAQ d.o.o. + * Copyright 2022-2025 openDAQ d.o.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.