chromium/net/base/ip_endpoint.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/base/ip_endpoint.h"

#include <string.h>

#include <optional>
#include <ostream>
#include <tuple>
#include <utility>

#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_byteorder.h"
#include "base/values.h"
#include "build/build_config.h"
#include "net/base/ip_address.h"
#include "net/base/sys_addrinfo.h"

#if BUILDFLAG(IS_WIN)
#include <winsock2.h>

#include <ws2bth.h>

#include "net/base/winsock_util.h"  // For kBluetoothAddressSize
#endif

namespace net {

namespace {

// Value dictionary keys
constexpr std::string_view kValueAddressKey =;
constexpr std::string_view kValuePortKey =;

}  // namespace

// static
std::optional<IPEndPoint> IPEndPoint::FromValue(const base::Value& value) {}

IPEndPoint::IPEndPoint() = default;

IPEndPoint::~IPEndPoint() = default;

IPEndPoint::IPEndPoint(const IPAddress& address, uint16_t port)
    :{}

IPEndPoint::IPEndPoint(const IPEndPoint& endpoint) = default;

uint16_t IPEndPoint::port() const {}

AddressFamily IPEndPoint::GetFamily() const {}

int IPEndPoint::GetSockAddrFamily() const {}

bool IPEndPoint::ToSockAddr(struct sockaddr* address,
                            socklen_t* address_length) const {}

bool IPEndPoint::FromSockAddr(const struct sockaddr* sock_addr,
                              socklen_t sock_addr_len) {}

std::string IPEndPoint::ToString() const {}

std::string IPEndPoint::ToStringWithoutPort() const {}

bool IPEndPoint::operator<(const IPEndPoint& other) const {}

bool IPEndPoint::operator==(const IPEndPoint& other) const {}

bool IPEndPoint::operator!=(const IPEndPoint& that) const {}

base::Value IPEndPoint::ToValue() const {}

std::ostream& operator<<(std::ostream& os, const IPEndPoint& ip_endpoint) {}

}  // namespace net