Remove 'new_connection' attribute from ConnectionInfo
Bug: none Change-Id: Id08aa530ebf0bca50517d8e24b5cad9953a5691a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263180 Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36971}
This commit is contained in:
@ -309,7 +309,6 @@ Connection::Connection(rtc::WeakPtr<Port> port,
|
|||||||
last_ping_received_(0),
|
last_ping_received_(0),
|
||||||
last_data_received_(0),
|
last_data_received_(0),
|
||||||
last_ping_response_received_(0),
|
last_ping_response_received_(0),
|
||||||
reported_(false),
|
|
||||||
state_(IceCandidatePairState::WAITING),
|
state_(IceCandidatePairState::WAITING),
|
||||||
time_created_ms_(rtc::TimeMillis()),
|
time_created_ms_(rtc::TimeMillis()),
|
||||||
field_trials_(&kDefaultFieldTrials),
|
field_trials_(&kDefaultFieldTrials),
|
||||||
@ -901,16 +900,6 @@ void Connection::PrintPingsSinceLastResponse(std::string* s, size_t max) {
|
|||||||
*s = oss.str();
|
*s = oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Connection::reported() const {
|
|
||||||
RTC_DCHECK_RUN_ON(network_thread_);
|
|
||||||
return reported_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Connection::set_reported(bool reported) {
|
|
||||||
RTC_DCHECK_RUN_ON(network_thread_);
|
|
||||||
reported_ = reported;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Connection::selected() const {
|
bool Connection::selected() const {
|
||||||
RTC_DCHECK_RUN_ON(network_thread_);
|
RTC_DCHECK_RUN_ON(network_thread_);
|
||||||
return selected_;
|
return selected_;
|
||||||
@ -1486,7 +1475,6 @@ ConnectionInfo Connection::stats() {
|
|||||||
stats_.receiving = receiving_;
|
stats_.receiving = receiving_;
|
||||||
stats_.writable = write_state_ == STATE_WRITABLE;
|
stats_.writable = write_state_ == STATE_WRITABLE;
|
||||||
stats_.timeout = write_state_ == STATE_WRITE_TIMEOUT;
|
stats_.timeout = write_state_ == STATE_WRITE_TIMEOUT;
|
||||||
stats_.new_connection = !reported_;
|
|
||||||
stats_.rtt = rtt_;
|
stats_.rtt = rtt_;
|
||||||
stats_.key = this;
|
stats_.key = this;
|
||||||
stats_.state = state_;
|
stats_.state = state_;
|
||||||
|
@ -243,9 +243,6 @@ class Connection : public CandidatePairInterface {
|
|||||||
// Prints pings_since_last_response_ into a string.
|
// Prints pings_since_last_response_ into a string.
|
||||||
void PrintPingsSinceLastResponse(std::string* pings, size_t max);
|
void PrintPingsSinceLastResponse(std::string* pings, size_t max);
|
||||||
|
|
||||||
bool reported() const;
|
|
||||||
void set_reported(bool reported);
|
|
||||||
|
|
||||||
// `set_selected` is only used for logging in ToString above. The flag is
|
// `set_selected` is only used for logging in ToString above. The flag is
|
||||||
// set true by P2PTransportChannel for its selected candidate pair.
|
// set true by P2PTransportChannel for its selected candidate pair.
|
||||||
// TODO(tommi): Remove `selected()` once not referenced downstream.
|
// TODO(tommi): Remove `selected()` once not referenced downstream.
|
||||||
@ -436,7 +433,6 @@ class Connection : public CandidatePairInterface {
|
|||||||
absl::optional<int> unwritable_min_checks_ RTC_GUARDED_BY(network_thread_);
|
absl::optional<int> unwritable_min_checks_ RTC_GUARDED_BY(network_thread_);
|
||||||
absl::optional<int> inactive_timeout_ RTC_GUARDED_BY(network_thread_);
|
absl::optional<int> inactive_timeout_ RTC_GUARDED_BY(network_thread_);
|
||||||
|
|
||||||
bool reported_ RTC_GUARDED_BY(network_thread_);
|
|
||||||
IceCandidatePairState state_ RTC_GUARDED_BY(network_thread_);
|
IceCandidatePairState state_ RTC_GUARDED_BY(network_thread_);
|
||||||
// Time duration to switch from receiving to not receiving.
|
// Time duration to switch from receiving to not receiving.
|
||||||
absl::optional<int> receiving_timeout_ RTC_GUARDED_BY(network_thread_);
|
absl::optional<int> receiving_timeout_ RTC_GUARDED_BY(network_thread_);
|
||||||
|
@ -17,7 +17,6 @@ ConnectionInfo::ConnectionInfo()
|
|||||||
writable(false),
|
writable(false),
|
||||||
receiving(false),
|
receiving(false),
|
||||||
timeout(false),
|
timeout(false),
|
||||||
new_connection(false),
|
|
||||||
rtt(0),
|
rtt(0),
|
||||||
sent_discarded_bytes(0),
|
sent_discarded_bytes(0),
|
||||||
sent_total_bytes(0),
|
sent_total_bytes(0),
|
||||||
|
@ -39,7 +39,6 @@ struct ConnectionInfo {
|
|||||||
bool writable; // Has this connection received a STUN response?
|
bool writable; // Has this connection received a STUN response?
|
||||||
bool receiving; // Has this connection received anything?
|
bool receiving; // Has this connection received anything?
|
||||||
bool timeout; // Has this connection timed out?
|
bool timeout; // Has this connection timed out?
|
||||||
bool new_connection; // Is this a newly created connection?
|
|
||||||
size_t rtt; // The STUN RTT for this connection.
|
size_t rtt; // The STUN RTT for this connection.
|
||||||
size_t sent_discarded_bytes; // Number of outgoing bytes discarded due to
|
size_t sent_discarded_bytes; // Number of outgoing bytes discarded due to
|
||||||
// socket errors.
|
// socket errors.
|
||||||
|
@ -1653,7 +1653,6 @@ bool P2PTransportChannel::GetStats(IceTransportStats* ice_transport_stats) {
|
|||||||
stats.remote_candidate = SanitizeRemoteCandidate(stats.remote_candidate);
|
stats.remote_candidate = SanitizeRemoteCandidate(stats.remote_candidate);
|
||||||
stats.best_connection = (selected_connection_ == connection);
|
stats.best_connection = (selected_connection_ == connection);
|
||||||
ice_transport_stats->connection_infos.push_back(std::move(stats));
|
ice_transport_stats->connection_infos.push_back(std::move(stats));
|
||||||
connection->set_reported(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ice_transport_stats->selected_candidate_pair_changes =
|
ice_transport_stats->selected_candidate_pair_changes =
|
||||||
|
@ -1367,7 +1367,6 @@ TEST_F(P2PTransportChannelTest, GetStats) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ASSERT_TRUE(best_conn_info != nullptr);
|
ASSERT_TRUE(best_conn_info != nullptr);
|
||||||
EXPECT_TRUE(best_conn_info->new_connection);
|
|
||||||
EXPECT_TRUE(best_conn_info->receiving);
|
EXPECT_TRUE(best_conn_info->receiving);
|
||||||
EXPECT_TRUE(best_conn_info->writable);
|
EXPECT_TRUE(best_conn_info->writable);
|
||||||
EXPECT_FALSE(best_conn_info->timeout);
|
EXPECT_FALSE(best_conn_info->timeout);
|
||||||
@ -1418,7 +1417,6 @@ TEST_F(P2PTransportChannelTest, GetStatsSwitchConnection) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ASSERT_TRUE(best_conn_info != nullptr);
|
ASSERT_TRUE(best_conn_info != nullptr);
|
||||||
EXPECT_TRUE(best_conn_info->new_connection);
|
|
||||||
EXPECT_TRUE(best_conn_info->receiving);
|
EXPECT_TRUE(best_conn_info->receiving);
|
||||||
EXPECT_TRUE(best_conn_info->writable);
|
EXPECT_TRUE(best_conn_info->writable);
|
||||||
EXPECT_FALSE(best_conn_info->timeout);
|
EXPECT_FALSE(best_conn_info->timeout);
|
||||||
|
Reference in New Issue
Block a user