LLDB  mainline
UDPSocket.h
Go to the documentation of this file.
1 //===-- UDPSocket.h ---------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_HOST_COMMON_UDPSOCKET_H
10 #define LLDB_HOST_COMMON_UDPSOCKET_H
11 
12 #include "lldb/Host/Socket.h"
13 
14 namespace lldb_private {
15 class UDPSocket : public Socket {
16 public:
17  UDPSocket(bool should_close, bool child_processes_inherit);
18 
19  static llvm::Expected<std::unique_ptr<UDPSocket>>
20  Connect(llvm::StringRef name, bool child_processes_inherit);
21 
22  std::string GetRemoteConnectionURI() const override;
23 
24 private:
25  UDPSocket(NativeSocket socket);
26 
27  size_t Send(const void *buf, const size_t num_bytes) override;
28  Status Connect(llvm::StringRef name) override;
29  Status Listen(llvm::StringRef name, int backlog) override;
30  Status Accept(Socket *&socket) override;
31 
33 };
34 }
35 
36 #endif // LLDB_HOST_COMMON_UDPSOCKET_H
lldb_private::Socket
Definition: Socket.h:42
lldb_private::UDPSocket::Send
size_t Send(const void *buf, const size_t num_bytes) override
Definition: UDPSocket.cpp:36
lldb_private::UDPSocket::Accept
Status Accept(Socket *&socket) override
Definition: UDPSocket.cpp:49
lldb_private::UDPSocket
Definition: UDPSocket.h:15
Socket.h
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::NativeSocket
int NativeSocket
Definition: Socket.h:37
lldb_private::UDPSocket::Listen
Status Listen(llvm::StringRef name, int backlog) override
Definition: UDPSocket.cpp:45
lldb_private::Status
Definition: Status.h:44
lldb_private::UDPSocket::UDPSocket
UDPSocket(bool should_close, bool child_processes_inherit)
Definition: UDPSocket.cpp:33
lldb_private::UDPSocket::Connect
static llvm::Expected< std::unique_ptr< UDPSocket > > Connect(llvm::StringRef name, bool child_processes_inherit)
Definition: UDPSocket.cpp:54
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::UDPSocket::m_sockaddr
SocketAddress m_sockaddr
Definition: UDPSocket.h:32
lldb_private::UDPSocket::GetRemoteConnectionURI
std::string GetRemoteConnectionURI() const override
Definition: UDPSocket.cpp:134
lldb_private::SocketAddress
Definition: SocketAddress.h:34