From 6523465168a4518f7b0699a3f2b87a5155a8470f Mon Sep 17 00:00:00 2001 From: Michael Beardsworth Date: Mon, 6 May 2024 12:42:07 -0700 Subject: [PATCH] Add docs Signed-off-by: Michael Beardsworth --- include/gz/transport/Discovery.hh | 2 ++ include/gz/transport/Node.hh | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/gz/transport/Discovery.hh b/include/gz/transport/Discovery.hh index 186af602..02888980 100644 --- a/include/gz/transport/Discovery.hh +++ b/include/gz/transport/Discovery.hh @@ -760,6 +760,8 @@ namespace gz this->relayAddrs.push_back(addr); } + // \brief Gets this instance's relay addresses. + // \return The list of relay addresses. public: std::vector RelayAddresses() const { std::vector result; diff --git a/include/gz/transport/Node.hh b/include/gz/transport/Node.hh index c7f805b1..feeb4b38 100644 --- a/include/gz/transport/Node.hh +++ b/include/gz/transport/Node.hh @@ -762,7 +762,17 @@ namespace gz public: std::optional TopicStats( const std::string &_topic) const; - public: void AddGlobalRelay(const std::string& relay_address); + /// \brief Adds a unicast relay IP. All nodes in this process will send + /// UDP unicast traffic to the address to connect networks when UDP + /// multicast traffic is not forwarded. + /// It's also possible to use the environment variable GZ_RELAY to add + /// relays. + /// \param[in] _relayAddress IPv4 address of the relay to add. + public: void AddGlobalRelay(const std::string& _relayAddress); + + /// \brief Gets the relay addresses configured for all nodes in this + /// process. + /// \return The relay addresses. public: std::vector GlobalRelays() const; /// \brief Get a pointer to the shared node (singleton shared by all the