1//===-- UDPSocket.h ---------------------------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef liblldb_UDPSocket_h_ 10#define liblldb_UDPSocket_h_ 11 12#include "lldb/Host/Socket.h" 13 14namespace lldb_private { 15class UDPSocket : public Socket { 16public: 17 UDPSocket(bool should_close, bool child_processes_inherit); 18 19 static Status Connect(llvm::StringRef name, bool child_processes_inherit, 20 Socket *&socket); 21 22 std::string GetRemoteConnectionURI() const override; 23 24private: 25 UDPSocket(NativeSocket socket); 26 27 size_t Send(const void *buf, const size_t num_bytes) override; 28 Status Connect(llvm::StringRef name) override; 29 Status Listen(llvm::StringRef name, int backlog) override; 30 Status Accept(Socket *&socket) override; 31 32 SocketAddress m_sockaddr; 33}; 34} 35 36#endif // ifndef liblldb_UDPSocket_h_ 37