llvm/lldb/source/Host/common/TCPSocket.cpp

//===-- TCPSocket.cpp -----------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#if defined(_MSC_VER)
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif

#include "lldb/Host/common/TCPSocket.h"

#include "lldb/Host/Config.h"
#include "lldb/Host/MainLoop.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"

#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/WindowsError.h"
#include "llvm/Support/raw_ostream.h"

#if LLDB_ENABLE_POSIX
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#endif

#if defined(_WIN32)
#include <winsock2.h>
#endif

#ifdef _WIN32
#define CLOSE_SOCKET
typedef const char *set_socket_option_arg_type;
#else
#include <unistd.h>
#define CLOSE_SOCKET
set_socket_option_arg_type;
#endif

usingnamespacelldb;
usingnamespacelldb_private;

static Status GetLastSocketError() {}

static const int kType =;

TCPSocket::TCPSocket(bool should_close, bool child_processes_inherit)
    :{}

TCPSocket::TCPSocket(NativeSocket socket, const TCPSocket &listen_socket)
    :{}

TCPSocket::TCPSocket(NativeSocket socket, bool should_close,
                     bool child_processes_inherit)
    :{}

TCPSocket::~TCPSocket() {}

bool TCPSocket::IsValid() const {}

// Return the port number that is being used by the socket.
uint16_t TCPSocket::GetLocalPortNumber() const {}

std::string TCPSocket::GetLocalIPAddress() const {}

uint16_t TCPSocket::GetRemotePortNumber() const {}

std::string TCPSocket::GetRemoteIPAddress() const {}

std::string TCPSocket::GetRemoteConnectionURI() const {}

Status TCPSocket::CreateSocket(int domain) {}

Status TCPSocket::Connect(llvm::StringRef name) {}

Status TCPSocket::Listen(llvm::StringRef name, int backlog) {}

void TCPSocket::CloseListenSockets() {}

Status TCPSocket::Accept(Socket *&conn_socket) {}

int TCPSocket::SetOptionNoDelay() {}

int TCPSocket::SetOptionReuseAddress() {}