LLDB mainline
|
#include <DomainSocket.h>
Public Member Functions | |
DomainSocket (bool should_close, bool child_processes_inherit) | |
Status | Connect (llvm::StringRef name) override |
Status | Listen (llvm::StringRef name, int backlog) override |
Status | Accept (Socket *&socket) override |
std::string | GetRemoteConnectionURI () const override |
Public Member Functions inherited from lldb_private::Socket | |
~Socket () override | |
virtual Status | Connect (llvm::StringRef name)=0 |
virtual Status | Listen (llvm::StringRef name, int backlog)=0 |
virtual Status | Accept (Socket *&socket)=0 |
int | GetOption (int level, int option_name, int &option_value) |
int | SetOption (int level, int option_name, int option_value) |
NativeSocket | GetNativeSocket () const |
SocketProtocol | GetSocketProtocol () const |
Status | Read (void *buf, size_t &num_bytes) override |
Status | Write (const void *buf, size_t &num_bytes) override |
Status | Close () override |
bool | IsValid () const override |
WaitableHandle | GetWaitableHandle () override |
virtual std::string | GetRemoteConnectionURI () const |
Public Member Functions inherited from lldb_private::IOObject | |
IOObject (FDType type) | |
virtual | ~IOObject () |
virtual Status | Read (void *buf, size_t &num_bytes)=0 |
virtual Status | Write (const void *buf, size_t &num_bytes)=0 |
virtual bool | IsValid () const =0 |
virtual Status | Close ()=0 |
FDType | GetFdType () const |
virtual WaitableHandle | GetWaitableHandle ()=0 |
Protected Member Functions | |
DomainSocket (SocketProtocol protocol, bool child_processes_inherit) | |
virtual size_t | GetNameOffset () const |
virtual void | DeleteSocketFile (llvm::StringRef name) |
std::string | GetSocketName () const |
Protected Member Functions inherited from lldb_private::Socket | |
Socket (SocketProtocol protocol, bool should_close, bool m_child_process_inherit) | |
virtual size_t | Send (const void *buf, const size_t num_bytes) |
Private Member Functions | |
DomainSocket (NativeSocket socket, const DomainSocket &listen_socket) | |
Additional Inherited Members | |
Public Types inherited from lldb_private::Socket | |
enum | SocketProtocol { ProtocolTcp , ProtocolUdp , ProtocolUnixDomain , ProtocolUnixAbstract } |
Public Types inherited from lldb_private::IOObject | |
enum | FDType { eFDTypeFile , eFDTypeSocket } |
typedef int | WaitableHandle |
Static Public Member Functions inherited from lldb_private::Socket | |
static const char * | FindSchemeByProtocol (const SocketProtocol protocol) |
static bool | FindProtocolByScheme (const char *scheme, SocketProtocol &protocol) |
static llvm::Error | Initialize () |
static void | Terminate () |
static std::unique_ptr< Socket > | Create (const SocketProtocol protocol, bool child_processes_inherit, Status &error) |
static llvm::Expected< std::unique_ptr< TCPSocket > > | TcpListen (llvm::StringRef host_and_port, bool child_processes_inherit, int backlog=5) |
static llvm::Expected< std::unique_ptr< Socket > > | TcpConnect (llvm::StringRef host_and_port, bool child_processes_inherit) |
static llvm::Expected< std::unique_ptr< UDPSocket > > | UdpConnect (llvm::StringRef host_and_port, bool child_processes_inherit) |
static llvm::Expected< HostAndPort > | DecodeHostAndPort (llvm::StringRef host_and_port) |
Static Public Attributes inherited from lldb_private::Socket | |
static const NativeSocket | kInvalidSocketValue = -1 |
Static Public Attributes inherited from lldb_private::IOObject | |
static const WaitableHandle | kInvalidHandleValue = -1 |
Static Protected Member Functions inherited from lldb_private::Socket | |
static void | SetLastError (Status &error) |
static NativeSocket | CreateSocket (const int domain, const int type, const int protocol, bool child_processes_inherit, Status &error) |
static NativeSocket | AcceptSocket (NativeSocket sockfd, struct sockaddr *addr, socklen_t *addrlen, bool child_processes_inherit, Status &error) |
Protected Attributes inherited from lldb_private::Socket | |
SocketProtocol | m_protocol |
NativeSocket | m_socket |
bool | m_child_processes_inherit |
bool | m_should_close_fd |
Protected Attributes inherited from lldb_private::IOObject | |
FDType | m_fd_type |
Definition at line 15 of file DomainSocket.h.
DomainSocket::DomainSocket | ( | bool | should_close, |
bool | child_processes_inherit | ||
) |
Definition at line 59 of file DomainSocket.cpp.
|
protected |
Definition at line 62 of file DomainSocket.cpp.
|
private |
Definition at line 66 of file DomainSocket.cpp.
References lldb_private::Socket::m_socket.
Implements lldb_private::Socket.
Definition at line 111 of file DomainSocket.cpp.
References lldb_private::Socket::AcceptSocket(), error(), lldb_private::Socket::GetNativeSocket(), and lldb_private::Socket::m_child_processes_inherit.
|
overridevirtual |
Implements lldb_private::Socket.
Definition at line 73 of file DomainSocket.cpp.
References lldb_private::Socket::CreateSocket(), error(), GetNameOffset(), lldb_private::Socket::GetNativeSocket(), kDomain, kType, lldb_private::Socket::m_child_processes_inherit, lldb_private::Socket::m_socket, lldb_private::Socket::SetLastError(), and SetSockAddr().
|
protectedvirtual |
Reimplemented in lldb_private::AbstractSocket.
Definition at line 123 of file DomainSocket.cpp.
Referenced by Listen().
|
protectedvirtual |
Reimplemented in lldb_private::AbstractSocket.
Definition at line 121 of file DomainSocket.cpp.
Referenced by Connect(), GetRemoteConnectionURI(), GetSocketName(), and Listen().
|
overridevirtual |
Reimplemented from lldb_private::Socket.
Definition at line 149 of file DomainSocket.cpp.
References GetNameOffset(), and GetSocketName().
|
protected |
Definition at line 127 of file DomainSocket.cpp.
References GetNameOffset(), lldb_private::Socket::kInvalidSocketValue, and lldb_private::Socket::m_socket.
Referenced by GetRemoteConnectionURI().
|
overridevirtual |
Implements lldb_private::Socket.
Definition at line 90 of file DomainSocket.cpp.
References lldb_private::Socket::CreateSocket(), DeleteSocketFile(), error(), GetNameOffset(), lldb_private::Socket::GetNativeSocket(), kDomain, kType, lldb_private::Socket::m_child_processes_inherit, lldb_private::Socket::m_socket, lldb_private::Socket::SetLastError(), and SetSockAddr().