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
14namespace lldb_private {
15class UDPSocket : public Socket {
16public:
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
24private:
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
An error handling class.
Definition: Status.h:44
Status Listen(llvm::StringRef name, int backlog) override
Definition: UDPSocket.cpp:46
SocketAddress m_sockaddr
Definition: UDPSocket.h:32
std::string GetRemoteConnectionURI() const override
Definition: UDPSocket.cpp:132
static llvm::Expected< std::unique_ptr< UDPSocket > > Connect(llvm::StringRef name, bool child_processes_inherit)
Definition: UDPSocket.cpp:55
size_t Send(const void *buf, const size_t num_bytes) override
Definition: UDPSocket.cpp:37
Status Accept(Socket *&socket) override
Definition: UDPSocket.cpp:50
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
int NativeSocket
Definition: Socket.h:36