diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index e6c62e0aeda..d3a8f1a7ced 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -225,6 +225,43 @@ void TCPTransportInterface::clean() } } +<<<<<<< HEAD +======= +Locator TCPTransportInterface::remote_endpoint_to_locator( + const std::shared_ptr& channel) const +{ + Locator locator; + asio::error_code ec; + auto endpoint = channel->remote_endpoint(ec); + if (ec) + { + LOCATOR_INVALID(locator); + } + else + { + endpoint_to_locator(endpoint, locator); + } + return locator; +} + +Locator TCPTransportInterface::local_endpoint_to_locator( + const std::shared_ptr& channel) const +{ + Locator locator; + asio::error_code ec; + auto endpoint = channel->local_endpoint(ec); + if (ec) + { + LOCATOR_INVALID(locator); + } + else + { + endpoint_to_locator(endpoint, locator); + } + return locator; +} + +>>>>>>> 08193d5f7 (Protect asio exception hotfix (#4527)) void TCPTransportInterface::bind_socket( std::shared_ptr& channel) {