chromium/third_party/webrtc/p2p/base/basic_ice_controller.cc

/*
 *  Copyright 2019 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "p2p/base/basic_ice_controller.h"

namespace {

// The minimum improvement in RTT that justifies a switch.
const int kMinImprovement =;

bool IsRelayRelay(const cricket::Connection* conn) {}

bool IsUdp(const cricket::Connection* conn) {}

// TODO(qingsi) Use an enum to replace the following constants for all
// comparision results.
static constexpr int a_is_better =;
static constexpr int b_is_better =;
static constexpr int a_and_b_equal =;

bool LocalCandidateUsesPreferredNetwork(
    const cricket::Connection* conn,
    absl::optional<rtc::AdapterType> network_preference) {}

int CompareCandidatePairsByNetworkPreference(
    const cricket::Connection* a,
    const cricket::Connection* b,
    absl::optional<rtc::AdapterType> network_preference) {}

}  // namespace

namespace cricket {

BasicIceController::BasicIceController(const IceControllerFactoryArgs& args)
    :{}

BasicIceController::~BasicIceController() {}

void BasicIceController::SetIceConfig(const IceConfig& config) {}

void BasicIceController::SetSelectedConnection(
    const Connection* selected_connection) {}

void BasicIceController::AddConnection(const Connection* connection) {}

void BasicIceController::OnConnectionDestroyed(const Connection* connection) {}

bool BasicIceController::HasPingableConnection() const {}

IceControllerInterface::PingResult BasicIceController::SelectConnectionToPing(
    int64_t last_ping_sent_ms) {}

void BasicIceController::MarkConnectionPinged(const Connection* conn) {}

// Returns the next pingable connection to ping.
const Connection* BasicIceController::FindNextPingableConnection() {}

// Find "triggered checks".  We ping first those connections that have
// received a ping but have not sent a ping since receiving it
// (last_ping_received > last_ping_sent).  But we shouldn't do
// triggered checks if the connection is already writable.
const Connection* BasicIceController::FindOldestConnectionNeedingTriggeredCheck(
    int64_t now) {}

bool BasicIceController::WritableConnectionPastPingInterval(
    const Connection* conn,
    int64_t now) const {}

int BasicIceController::CalculateActiveWritablePingInterval(
    const Connection* conn,
    int64_t now) const {}

// Is the connection in a state for us to even consider pinging the other side?
// We consider a connection pingable even if it's not connected because that's
// how a TCP connection is kicked into reconnecting on the active side.
bool BasicIceController::IsPingable(const Connection* conn, int64_t now) const {}

// A connection is considered a backup connection if the channel state
// is completed, the connection is not the selected connection and it is active.
bool BasicIceController::IsBackupConnection(const Connection* conn) const {}

const Connection* BasicIceController::MorePingable(const Connection* conn1,
                                                   const Connection* conn2) {}

const Connection* BasicIceController::MostLikelyToWork(
    const Connection* conn1,
    const Connection* conn2) {}

const Connection* BasicIceController::LeastRecentlyPinged(
    const Connection* conn1,
    const Connection* conn2) {}

std::map<const rtc::Network*, const Connection*>
BasicIceController::GetBestConnectionByNetwork() const {}

std::vector<const Connection*>
BasicIceController::GetBestWritableConnectionPerNetwork() const {}

IceControllerInterface::SwitchResult
BasicIceController::HandleInitialSelectDampening(
    IceSwitchReason reason,
    const Connection* new_connection) {}

IceControllerInterface::SwitchResult BasicIceController::ShouldSwitchConnection(
    IceSwitchReason reason,
    const Connection* new_connection) {}

IceControllerInterface::SwitchResult
BasicIceController::SortAndSwitchConnection(IceSwitchReason reason) {}

bool BasicIceController::ReadyToSend(const Connection* connection) const {}

bool BasicIceController::PresumedWritable(const Connection* conn) const {}

// Compare two connections based on their writing, receiving, and connected
// states.
int BasicIceController::CompareConnectionStates(
    const Connection* a,
    const Connection* b,
    absl::optional<int64_t> receiving_unchanged_threshold,
    bool* missed_receiving_unchanged_threshold) const {}

// Compares two connections based only on the candidate and network information.
// Returns positive if `a` is better than `b`.
int BasicIceController::CompareConnectionCandidates(const Connection* a,
                                                    const Connection* b) const {}

int BasicIceController::CompareConnections(
    const Connection* a,
    const Connection* b,
    absl::optional<int64_t> receiving_unchanged_threshold,
    bool* missed_receiving_unchanged_threshold) const {}

int BasicIceController::CompareCandidatePairNetworks(
    const Connection* a,
    const Connection* b,
    absl::optional<rtc::AdapterType> network_preference) const {}

std::vector<const Connection*> BasicIceController::PruneConnections() {}

bool BasicIceController::GetUseCandidateAttr(const Connection* conn,
                                             NominationMode mode,
                                             IceMode remote_ice_mode) const {}

}  // namespace cricket