llvm/lldb/include/lldb/Host/Socket.h

//===-- Socket.h ------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_HOST_SOCKET_H
#define LLDB_HOST_SOCKET_H

#include <memory>
#include <string>

#include "lldb/Host/MainLoopBase.h"
#include "lldb/lldb-private.h"

#include "lldb/Host/SocketAddress.h"
#include "lldb/Utility/IOObject.h"
#include "lldb/Utility/Status.h"

#ifdef _WIN32
#include "lldb/Host/Pipe.h"
#include "lldb/Host/windows/windows.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#endif

namespace llvm {
class StringRef;
}

namespace lldb_private {

#if defined(_WIN32)
typedef SOCKET NativeSocket;
typedef lldb::pipe_t shared_fd_t;
#else
NativeSocket;
shared_fd_t;
#endif
class Socket;
class TCPSocket;
class UDPSocket;

class SharedSocket {};

class Socket : public IOObject {};

llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
                              const Socket::HostAndPort &HP);

} // namespace lldb_private

#endif // LLDB_HOST_SOCKET_H