]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Host/posix/DomainSocket.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Host / posix / DomainSocket.h
1 //===-- DomainSocket.h ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_DomainSocket_h_
11 #define liblldb_DomainSocket_h_
12
13 #include "lldb/Host/Socket.h"
14
15 namespace lldb_private {
16 class DomainSocket : public Socket {
17 public:
18   DomainSocket(bool child_processes_inherit, Error &error);
19
20   Error Connect(llvm::StringRef name) override;
21   Error Listen(llvm::StringRef name, int backlog) override;
22   Error Accept(llvm::StringRef name, bool child_processes_inherit,
23                Socket *&socket) override;
24
25 protected:
26   DomainSocket(SocketProtocol protocol, bool child_processes_inherit,
27                Error &error);
28
29   virtual size_t GetNameOffset() const;
30   virtual void DeleteSocketFile(llvm::StringRef name);
31
32 private:
33   DomainSocket(NativeSocket socket);
34 };
35 }
36
37 #endif // ifndef liblldb_DomainSocket_h_