fgerlits commented on code in PR #2084:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2084#discussion_r2691170632
##########
libminifi/test/libtest/unit/TestUtils.h:
##########
@@ -170,11 +170,16 @@ bool countLogOccurrencesUntil(const std::string& pattern,
const size_t occurrences,
const std::chrono::milliseconds max_duration,
const std::chrono::milliseconds wait_time =
50ms);
+
+struct UdpNetworkSendResult {
+ std::error_code ec;
+ std::optional<asio::ip::udp::endpoint> local_endpoint = std::nullopt;
+};
Review Comment:
Is this better than a `std::expected<asio::ip::udp::endpoint,
std::error_code>`? To me, that would be clearer.
##########
extensions/standard-processors/processors/ListenUDP.h:
##########
@@ -63,9 +63,10 @@ class ListenUDP : public NetworkListenerProcessor {
EXTENSIONAPI static constexpr auto Success =
core::RelationshipDefinition{"success", "Messages received successfully will be
sent out this relationship."};
EXTENSIONAPI static constexpr auto Relationships = std::array{Success};
- EXTENSIONAPI static constexpr auto PortOutputAttribute =
core::OutputAttributeDefinition<0>{"udp.port", {}, "The sending port the
messages were received."};
+ EXTENSIONAPI static constexpr auto PortOutputAttribute =
core::OutputAttributeDefinition<0>{"udp.port", {}, "The listening port on which
the messages were received."};
Review Comment:
Can we rename this to `LocalPort` or `ListeningPort`, please? With
`PortOutputAttribute` and `SenderPort`, it's not clear what the difference is
between them.
##########
extension-framework/src/utils/net/TcpServer.cpp:
##########
@@ -104,7 +107,7 @@ asio::awaitable<void>
TcpServer::secureSession(asio::ip::tcp::socket socket, asi
logger_->log_warn("Handshake with {} failed due to {}", remote_address,
handshake_error.message());
co_return;
}
- co_await readLoop(ssl_socket, remote_address, local_port); // NOLINT
+ co_await readLoop(ssl_socket, remote_address, remote_port, local_port); //
NOLINT
Review Comment:
what is the NOLINT here for? can it be removed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]