1 //===-- UDPSocket.h ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_UDPSocket_h_
11 #define liblldb_UDPSocket_h_
12 
13 #include "lldb/Host/Socket.h"
14 
15 namespace lldb_private {
16 class UDPSocket : public Socket {
17 public:
18   UDPSocket(bool should_close, bool child_processes_inherit);
19 
20   static Status Connect(llvm::StringRef name, bool child_processes_inherit,
21                         Socket *&socket);
22 
23 private:
24   UDPSocket(NativeSocket socket);
25 
26   size_t Send(const void *buf, const size_t num_bytes) override;
27   Status Connect(llvm::StringRef name) override;
28   Status Listen(llvm::StringRef name, int backlog) override;
29   Status Accept(Socket *&socket) override;
30 
31   SocketAddress m_sockaddr;
32 };
33 }
34 
35 #endif // ifndef liblldb_UDPSocket_h_
36