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
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 // LLDB_HOST_POSIX_DOMAINSOCKET_H
Status Listen(llvm::StringRef name, int backlog) override
Status Accept(Socket *&socket) override
virtual size_t GetNameOffset() const
virtual void DeleteSocketFile(llvm::StringRef name)
Status Connect(llvm::StringRef name) override
std::string GetSocketName() const
std::string GetRemoteConnectionURI() const override
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.
int NativeSocket
Definition: Socket.h:36