9#ifndef LLDB_HOST_POSIX_CONNECTIONFILEDESCRIPTORPOSIX_H
10#define LLDB_HOST_POSIX_CONNECTIONFILEDESCRIPTORPOSIX_H
31 typedef llvm::function_ref<void(llvm::StringRef local_socket_id)>
45 Status *error_ptr)
override;
57 Status *error_ptr)
override;
59 std::string
GetURI()
override;
75 llvm::StringRef socket_name,
76 llvm::function_ref<
void(
Socket &)> post_listen_callback,
80 llvm::StringRef socket_name,
const ConnectionFileDescriptor & operator=(const ConnectionFileDescriptor &)=delete
lldb::ConnectionStatus AcceptTCP(llvm::StringRef host_and_port, socket_id_callback_type socket_id_callback, Status *error_ptr)
ConnectionFileDescriptor()
ConnectionFileDescriptor(const ConnectionFileDescriptor &)=delete
lldb::ConnectionStatus ConnectNamedSocket(llvm::StringRef socket_name, socket_id_callback_type socket_id_callback, Status *error_ptr)
~ConnectionFileDescriptor() override
lldb::ConnectionStatus AcceptAbstractSocket(llvm::StringRef socket_name, socket_id_callback_type socket_id_callback, Status *error_ptr)
lldb::ConnectionStatus ConnectUDP(llvm::StringRef args, socket_id_callback_type socket_id_callback, Status *error_ptr)
lldb::ConnectionStatus ConnectSerialPort(llvm::StringRef args, socket_id_callback_type socket_id_callback, Status *error_ptr)
std::atomic< bool > m_shutting_down
bool InterruptRead() override
Interrupts an ongoing Read() operation.
lldb::ConnectionStatus Connect(llvm::StringRef url, Status *error_ptr) override
Connect using the connect string url.
bool IsConnected() const override
Check if the connection is valid.
void InitializeSocket(Socket *socket)
lldb::ConnectionStatus AcceptNamedSocket(llvm::StringRef socket_name, socket_id_callback_type socket_id_callback, Status *error_ptr)
size_t Write(const void *src, size_t src_len, lldb::ConnectionStatus &status, Status *error_ptr) override
The actual write function that attempts to write to the communications protocol.
std::recursive_mutex m_mutex
lldb::IOObjectSP GetReadObject() override
Returns the underlying IOObject used by the Connection.
lldb::ConnectionStatus AcceptSocket(Socket::SocketProtocol socket_protocol, llvm::StringRef socket_name, llvm::function_ref< void(Socket &)> post_listen_callback, Status *error_ptr)
lldb::ConnectionStatus ConnectFD(llvm::StringRef args, socket_id_callback_type socket_id_callback, Status *error_ptr)
lldb::ConnectionStatus ConnectAbstractSocket(llvm::StringRef socket_name, socket_id_callback_type socket_id_callback, Status *error_ptr)
lldb::ConnectionStatus Disconnect(Status *error_ptr) override
Disconnect the communications connection if one is currently connected.
lldb::ConnectionStatus BytesAvailable(const Timeout< std::micro > &timeout, Status *error_ptr)
lldb::ConnectionStatus ConnectFile(llvm::StringRef args, socket_id_callback_type socket_id_callback, Status *error_ptr)
lldb::ConnectionStatus ConnectSocket(Socket::SocketProtocol socket_protocol, llvm::StringRef socket_name, Status *error_ptr)
std::string GetURI() override
Returns a URI that describes this connection object.
lldb::ConnectionStatus ConnectTCP(llvm::StringRef host_and_port, socket_id_callback_type socket_id_callback, Status *error_ptr)
size_t Read(void *dst, size_t dst_len, const Timeout< std::micro > &timeout, lldb::ConnectionStatus &status, Status *error_ptr) override
The read function that attempts to read from the connection.
llvm::function_ref< void(llvm::StringRef local_socket_id)> socket_id_callback_type
A communication connection class.
A posix-based implementation of Pipe, a class that abtracts unix style pipes.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::IOObject > IOObjectSP
ConnectionStatus
Connection Status Types.