diff options
Diffstat (limited to 'source/Host/common/UDPSocket.cpp')
-rw-r--r-- | source/Host/common/UDPSocket.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/Host/common/UDPSocket.cpp b/source/Host/common/UDPSocket.cpp index 96bcc6a150a9e..8dbf57d6fe4ec 100644 --- a/source/Host/common/UDPSocket.cpp +++ b/source/Host/common/UDPSocket.cpp @@ -1,9 +1,8 @@ //===-- UDPSocket.cpp -------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -135,3 +134,11 @@ Status UDPSocket::Connect(llvm::StringRef name, bool child_processes_inherit, error.Clear(); return error; } + +std::string UDPSocket::GetRemoteConnectionURI() const { + if (m_socket != kInvalidSocketValue) { + return llvm::formatv("udp://[{0}]:{1}", m_sockaddr.GetIPAddress(), + m_sockaddr.GetPort()); + } + return ""; +} |