#include "lldb/Host/posix/DomainSocket.h"
#include "lldb/Utility/LLDBLog.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/FileSystem.h"
#include <cstddef>
#include <memory>
#include <sys/socket.h>
#include <sys/un.h>
usingnamespacelldb;
usingnamespacelldb_private;
#ifdef __ANDROID__
#ifndef SUN_LEN
#define SUN_LEN …
#endif
#endif
static const int kDomain = …;
static const int kType = …;
static bool SetSockAddr(llvm::StringRef name, const size_t name_offset,
sockaddr_un *saddr_un, socklen_t &saddr_un_len) { … }
DomainSocket::DomainSocket(bool should_close, bool child_processes_inherit)
: … { … }
DomainSocket::DomainSocket(NativeSocket socket, bool should_close,
bool child_processes_inherit)
: … { … }
DomainSocket::DomainSocket(SocketProtocol protocol,
bool child_processes_inherit)
: … { … }
DomainSocket::DomainSocket(NativeSocket socket,
const DomainSocket &listen_socket)
: … { … }
Status DomainSocket::Connect(llvm::StringRef name) { … }
Status DomainSocket::Listen(llvm::StringRef name, int backlog) { … }
llvm::Expected<std::vector<MainLoopBase::ReadHandleUP>> DomainSocket::Accept(
MainLoopBase &loop,
std::function<void(std::unique_ptr<Socket> socket)> sock_cb) { … }
size_t DomainSocket::GetNameOffset() const { … }
void DomainSocket::DeleteSocketFile(llvm::StringRef name) { … }
std::string DomainSocket::GetSocketName() const { … }
std::string DomainSocket::GetRemoteConnectionURI() const { … }