LLDB mainline
|
#include <AbstractSocket.h>
Public Member Functions | |
AbstractSocket () | |
AbstractSocket (NativeSocket socket, bool should_close) | |
Public Member Functions inherited from lldb_private::DomainSocket | |
DomainSocket (NativeSocket socket, bool should_close) | |
DomainSocket (bool should_close) | |
Status | Connect (llvm::StringRef name) override |
Status | Listen (llvm::StringRef name, int backlog) override |
llvm::Expected< std::vector< MainLoopBase::ReadHandleUP > > | Accept (MainLoopBase &loop, std::function< void(std::unique_ptr< Socket > socket)> sock_cb) override |
std::string | GetRemoteConnectionURI () const override |
std::vector< std::string > | GetListeningConnectionURI () const override |
virtual Status | Accept (const Timeout< std::micro > &timeout, Socket *&socket) |
Public Member Functions inherited from lldb_private::Socket | |
~Socket () override | |
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 |
Public Member Functions inherited from lldb_private::IOObject | |
IOObject (FDType type) | |
virtual | ~IOObject () |
FDType | GetFdType () const |
Protected Member Functions | |
size_t | GetNameOffset () const override |
void | DeleteSocketFile (llvm::StringRef name) override |
Protected Member Functions inherited from lldb_private::DomainSocket | |
DomainSocket (SocketProtocol protocol) | |
DomainSocket (SocketProtocol protocol, NativeSocket socket, bool should_close) | |
std::string | GetSocketName () const |
Protected Member Functions inherited from lldb_private::Socket | |
Socket (SocketProtocol protocol, bool should_close) | |
virtual size_t | Send (const void *buf, const size_t num_bytes) |
Additional Inherited Members | |
Public Types inherited from lldb_private::DomainSocket | |
using | Pair |
Public Types inherited from lldb_private::Socket | |
enum | SocketProtocol { ProtocolTcp , ProtocolUdp , ProtocolUnixDomain , ProtocolUnixAbstract } |
enum | SocketMode { ModeAccept , ModeConnect } |
using | ProtocolModePair = std::pair<SocketProtocol, SocketMode> |
using | Pair = std::pair<std::unique_ptr<Socket>, std::unique_ptr<Socket>> |
Public Types inherited from lldb_private::IOObject | |
enum | FDType { eFDTypeFile , eFDTypeSocket } |
using | WaitableHandle = lldb::file_t |
Static Public Member Functions inherited from lldb_private::DomainSocket | |
static llvm::Expected< Pair > | CreatePair () |
static llvm::Expected< std::unique_ptr< DomainSocket > > | FromBoundNativeSocket (NativeSocket sockfd, bool should_close) |
Static Public Member Functions inherited from lldb_private::Socket | |
static std::optional< ProtocolModePair > | GetProtocolAndMode (llvm::StringRef scheme) |
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, Status &error) |
static llvm::Expected< Pair > | CreatePair (std::optional< SocketProtocol > protocol=std::nullopt) |
static llvm::Expected< std::unique_ptr< TCPSocket > > | TcpListen (llvm::StringRef host_and_port, int backlog=5) |
static llvm::Expected< std::unique_ptr< Socket > > | TcpConnect (llvm::StringRef host_and_port) |
static llvm::Expected< std::unique_ptr< UDPSocket > > | UdpConnect (llvm::StringRef host_and_port) |
static int | GetOption (NativeSocket sockfd, int level, int option_name, int &option_value) |
static int | SetOption (NativeSocket sockfd, int level, int option_name, int option_value) |
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 int | CloseSocket (NativeSocket sockfd) |
static Status | GetLastError () |
static void | SetLastError (Status &error) |
static NativeSocket | CreateSocket (const int domain, const int type, const int protocol, Status &error) |
static NativeSocket | AcceptSocket (NativeSocket sockfd, struct sockaddr *addr, socklen_t *addrlen, Status &error) |
Protected Attributes inherited from lldb_private::Socket | |
SocketProtocol | m_protocol |
NativeSocket | m_socket |
bool | m_should_close_fd |
Protected Attributes inherited from lldb_private::IOObject | |
FDType | m_fd_type |
Definition at line 15 of file AbstractSocket.h.
AbstractSocket::AbstractSocket | ( | ) |
Definition at line 16 of file AbstractSocket.cpp.
References lldb_private::DomainSocket::DomainSocket(), and lldb_private::Socket::ProtocolUnixAbstract.
AbstractSocket::AbstractSocket | ( | NativeSocket | socket, |
bool | should_close ) |
Definition at line 18 of file AbstractSocket.cpp.
References lldb_private::DomainSocket::DomainSocket(), and lldb_private::Socket::ProtocolUnixAbstract.
|
overrideprotectedvirtual |
Reimplemented from lldb_private::DomainSocket.
Definition at line 23 of file AbstractSocket.cpp.
|
overrideprotectedvirtual |
Reimplemented from lldb_private::DomainSocket.
Definition at line 21 of file AbstractSocket.cpp.