summaryrefslogtreecommitdiffstats
path: root/include/lldb/Host/posix/DomainSocket.h
blob: 76f58e4f03b26ce269c77bbbd1f1d692ffc45fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//===-- DomainSocket.h ------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef liblldb_DomainSocket_h_
#define liblldb_DomainSocket_h_

#include "lldb/Host/Socket.h"

namespace lldb_private
{
    class DomainSocket: public Socket
    {
    public:
        DomainSocket(bool child_processes_inherit, Error &error);

        Error Connect(llvm::StringRef name) override;
        Error Listen(llvm::StringRef name, int backlog) override;
        Error Accept(llvm::StringRef name, bool child_processes_inherit, Socket *&socket) override;

    protected:
        DomainSocket(SocketProtocol protocol, bool child_processes_inherit, Error &error);

        virtual size_t GetNameOffset() const;
        virtual void DeleteSocketFile(llvm::StringRef name);

    private:
        DomainSocket(NativeSocket socket);
    };
}

#endif // ifndef liblldb_DomainSocket_h_
OpenPOWER on IntegriCloud