LLDB  mainline
DomainSocket.h
Go to the documentation of this file.
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 LLDB_HOST_POSIX_DOMAINSOCKET_H
10 #define LLDB_HOST_POSIX_DOMAINSOCKET_H
11 
12 #include "lldb/Host/Socket.h"
13 
14 namespace lldb_private {
15 class DomainSocket : public Socket {
16 public:
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 
25 protected:
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 
32 private:
33  DomainSocket(NativeSocket socket, const DomainSocket &listen_socket);
34 };
35 }
36 
37 #endif // LLDB_HOST_POSIX_DOMAINSOCKET_H
lldb_private::DomainSocket
Definition: DomainSocket.h:15
lldb_private::Socket::SocketProtocol
SocketProtocol
Definition: Socket.h:44
lldb_private::Socket
Definition: Socket.h:42
lldb_private::DomainSocket::GetRemoteConnectionURI
std::string GetRemoteConnectionURI() const override
Definition: DomainSocket.cpp:147
lldb_private::DomainSocket::GetNameOffset
virtual size_t GetNameOffset() const
Definition: DomainSocket.cpp:123
lldb_private::DomainSocket::GetSocketName
std::string GetSocketName() const
Definition: DomainSocket.cpp:129
lldb_private::DomainSocket::Connect
Status Connect(llvm::StringRef name) override
Definition: DomainSocket.cpp:75
Socket.h
lldb_private::DomainSocket::Accept
Status Accept(Socket *&socket) override
Definition: DomainSocket.cpp:113
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:38
lldb_private::NativeSocket
int NativeSocket
Definition: Socket.h:37
lldb_private::Status
Definition: Status.h:44
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::DomainSocket::Listen
Status Listen(llvm::StringRef name, int backlog) override
Definition: DomainSocket.cpp:92
lldb_private::DomainSocket::DeleteSocketFile
virtual void DeleteSocketFile(llvm::StringRef name)
Definition: DomainSocket.cpp:125
lldb_private::DomainSocket::DomainSocket
DomainSocket(bool should_close, bool child_processes_inherit)
Definition: DomainSocket.cpp:61