1//===-- DomainSocket.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_DomainSocket_h_ 10#define liblldb_DomainSocket_h_ 11 12#include "lldb/Host/Socket.h" 13 14namespace lldb_private { 15class DomainSocket : public Socket { 16public: 17 DomainSocket(bool should_close, bool child_processes_inherit); 18 19 Status Connect(llvm::StringRef name) override; 20 Status Listen(llvm::StringRef name, int backlog) override; 21 Status Accept(Socket *&socket) override; 22 23 std::string GetRemoteConnectionURI() const override; 24 25protected: 26 DomainSocket(SocketProtocol protocol, bool child_processes_inherit); 27 28 virtual size_t GetNameOffset() const; 29 virtual void DeleteSocketFile(llvm::StringRef name); 30 std::string GetSocketName() const; 31 32private: 33 DomainSocket(NativeSocket socket, const DomainSocket &listen_socket); 34}; 35} 36 37#endif // ifndef liblldb_DomainSocket_h_ 38