Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/native_streaming/async_reader.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/native_streaming/async_writer.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/native_streaming/authentication.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions include/native_streaming/client.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -73,7 +73,7 @@ class Client : public std::enable_shared_from_this<Client>
/// @return pointer to created Session object
std::shared_ptr<Session> createSession(std::shared_ptr<WebsocketStream> wsStream,
const std::string& endpointAddress,
const boost::asio::ip::port_type& endpointPortNumber);
const uint16_t& endpointPortNumber);

/// async operations handler
std::shared_ptr<boost::asio::io_context> ioContextPtr;
Expand Down
2 changes: 1 addition & 1 deletion include/native_streaming/common.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/native_streaming/logging.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions include/native_streaming/server.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -89,7 +89,7 @@ class Server : public std::enable_shared_from_this<Server>
std::shared_ptr<Session> createSession(std::shared_ptr<WebsocketStream> wsStream,
const std::shared_ptr<void>& userContext,
const std::string& endpointAddress,
const boost::asio::ip::port_type& endpointPortNumber);
const uint16_t& endpointPortNumber);

/// async operations handler
std::shared_ptr<boost::asio::io_context> ioContextPtr;
Expand Down
8 changes: 4 additions & 4 deletions include/native_streaming/session.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -38,7 +38,7 @@ class Session : public std::enable_shared_from_this<Session>
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;
Expand Down Expand Up @@ -79,7 +79,7 @@ class Session : public std::enable_shared_from_this<Session>
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
Expand Down Expand Up @@ -130,7 +130,7 @@ class Session : public std::enable_shared_from_this<Session>
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
2 changes: 1 addition & 1 deletion include/native_streaming/utils/base64.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -175,7 +175,7 @@ void Client::onUpgradeConnection(const boost::system::error_code& ec, std::share

std::shared_ptr<Session> Client::createSession(std::shared_ptr<WebsocketStream> wsStream,
const std::string& endpointAddress,
const boost::asio::ip::port_type& endpointPortNumber)
const uint16_t& endpointPortNumber)
{
websocketStream.reset();
return std::make_shared<Session>(ioContextPtr, wsStream, nullptr, boost::beast::role_type::client, logCallback, endpointAddress, endpointPortNumber);
Expand Down
4 changes: 2 additions & 2 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -241,7 +241,7 @@ void Server::onUpgradeConnection(const boost::system::error_code& ec,
std::shared_ptr<Session> Server::createSession(std::shared_ptr<WebsocketStream> wsStream,
const std::shared_ptr<void>& userContext,
const std::string& endpointAddress,
const boost::asio::ip::port_type& endpointPortNumber)
const uint16_t& endpointPortNumber)
{
return std::make_shared<Session>(ioContextPtr, wsStream, userContext, boost::beast::role_type::server, logCallback, endpointAddress, endpointPortNumber);
}
Expand Down
4 changes: 2 additions & 2 deletions src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Session::Session(std::shared_ptr<boost::asio::io_context> 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)
Expand Down Expand Up @@ -180,7 +180,7 @@ std::string Session::getEndpointAddress()
return endpointAddress;
}

boost::asio::ip::port_type Session::getEndpointPortNumber()
uint16_t Session::getEndpointPortNumber()
{
return endpointPortNumber;
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_base.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/test_connection.hpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tools/license-header-checker/do-license-header-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tools/license-header-checker/license.in
Original file line number Diff line number Diff line change
@@ -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.
Expand Down