Lines Matching refs:lconn
249 static void SendPingAndReceiveResponse(Connection* lconn, in SendPingAndReceiveResponse() argument
255 lconn->Ping(rtc::TimeMillis()); in SendPingAndReceiveResponse()
263 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in SendPingAndReceiveResponse()
1462 Connection* lconn = in TEST_F() local
1472 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in TEST_F()
1551 Connection* lconn = in TEST_F() local
1553 ASSERT_NE(lconn, nullptr); in TEST_F()
1555 lconn->Ping(0); in TEST_F()
1564 lconn->Ping(0); in TEST_F()
1708 Connection* lconn = in TEST_F() local
1712 lconn->Ping(0); in TEST_F()
1753 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in TEST_F()
1756 EXPECT_EQ(1U, lconn->stats().sent_ping_requests_total); in TEST_F()
1757 EXPECT_EQ(1U, lconn->stats().sent_ping_requests_before_first_response); in TEST_F()
1758 EXPECT_EQ(1U, lconn->stats().recv_ping_responses); in TEST_F()
1833 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in TEST_F()
1844 EXPECT_EQ(1U, lconn->stats().sent_ping_responses); in TEST_F()
1845 EXPECT_EQ(1U, lconn->stats().recv_ping_requests); in TEST_F()
1870 Connection* lconn = in TEST_F() local
1877 lconn->set_nomination(nomination); in TEST_F()
1879 EXPECT_FALSE(lconn->nominated()); in TEST_F()
1881 EXPECT_EQ(lconn->nominated(), lconn->stats().nominated); in TEST_F()
1886 lconn->Ping(0); in TEST_F()
1892 EXPECT_FALSE(lconn->nominated()); in TEST_F()
1894 EXPECT_EQ(lconn->nominated(), lconn->stats().nominated); in TEST_F()
1901 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in TEST_F()
1903 EXPECT_EQ(nomination, lconn->acked_nomination()); in TEST_F()
1904 EXPECT_TRUE(lconn->nominated()); in TEST_F()
1906 EXPECT_EQ(lconn->nominated(), lconn->stats().nominated); in TEST_F()
1924 Connection* lconn = in TEST_F() local
1929 EXPECT_EQ(0u, lconn->stats().total_round_trip_time_ms); in TEST_F()
1930 EXPECT_FALSE(lconn->stats().current_round_trip_time_ms); in TEST_F()
1932 SendPingAndReceiveResponse(lconn, lport.get(), rconn, rport.get(), &clock, in TEST_F()
1934 EXPECT_EQ(10u, lconn->stats().total_round_trip_time_ms); in TEST_F()
1935 ASSERT_TRUE(lconn->stats().current_round_trip_time_ms); in TEST_F()
1936 EXPECT_EQ(10u, *lconn->stats().current_round_trip_time_ms); in TEST_F()
1938 SendPingAndReceiveResponse(lconn, lport.get(), rconn, rport.get(), &clock, in TEST_F()
1940 EXPECT_EQ(30u, lconn->stats().total_round_trip_time_ms); in TEST_F()
1941 ASSERT_TRUE(lconn->stats().current_round_trip_time_ms); in TEST_F()
1942 EXPECT_EQ(20u, *lconn->stats().current_round_trip_time_ms); in TEST_F()
1944 SendPingAndReceiveResponse(lconn, lport.get(), rconn, rport.get(), &clock, in TEST_F()
1946 EXPECT_EQ(60u, lconn->stats().total_round_trip_time_ms); in TEST_F()
1947 ASSERT_TRUE(lconn->stats().current_round_trip_time_ms); in TEST_F()
1948 EXPECT_EQ(30u, *lconn->stats().current_round_trip_time_ms); in TEST_F()
1963 Connection* lconn = in TEST_F() local
1965 lconn->Ping(0); in TEST_F()
2005 Connection* lconn = in TEST_F() local
2018 lconn->Ping(0); in TEST_F()
2049 Connection* lconn = in TEST_F() local
2051 lconn->Ping(0); in TEST_F()
2350 Connection* lconn = in TEST_F() local
2356 lconn->Ping(0); in TEST_F()
2369 lconn->OnReadPacket(buf.Data(), buf.Length(), /* packet_time_us */ -1); in TEST_F()
2371 EXPECT_FALSE(lconn->writable()); in TEST_F()
2387 Connection* lconn = in TEST_F() local
2397 lconn->OnReadPacket(buf.Data(), buf.Length(), /* packet_time_us */ -1); in TEST_F()
2398 EXPECT_EQ(0u, lconn->last_ping_received()); in TEST_F()
2434 Connection* lconn = in TEST_F() local
2444 lconn->OnReadPacket(rport->last_stun_buf()->data<char>(), in TEST_F()
2448 int64_t last_ping_received1 = lconn->last_ping_received(); in TEST_F()
2453 lconn->OnReadPacket(buf->Data(), buf->Length(), /* packet_time_us */ -1); in TEST_F()
2454 int64_t last_ping_received2 = lconn->last_ping_received(); in TEST_F()
2632 Connection* lconn = in TEST_F() local
2635 EXPECT_EQ(0x2001EE9FC003D0BU, lconn->priority()); in TEST_F()
2637 EXPECT_EQ(0x2001EE9FC003D0BLLU, lconn->priority()); in TEST_F()
3577 void SendPingAndCaptureReply(Connection* lconn, in SendPingAndCaptureReply() argument
3582 lconn->PortForTest() == lport_.get() ? lport_.get() : rport_.get(); in SendPingAndCaptureReply()
3585 lconn->Ping(rtc::TimeMillis()); in SendPingAndCaptureReply()
3597 void SendPingAndReceiveResponse(Connection* lconn, in SendPingAndReceiveResponse() argument
3601 SendPingAndCaptureReply(lconn, rconn, ms, &reply); in SendPingAndReceiveResponse()
3602 lconn->OnReadPacket(reply.data<char>(), reply.size(), in SendPingAndReceiveResponse()
3614 Connection* lconn = CreateConnection(ICEROLE_CONTROLLING); in TEST_F() local
3617 EXPECT_FALSE(lconn->writable()); in TEST_F()
3618 EXPECT_FALSE(lconn->receiving()); in TEST_F()
3619 EXPECT_TRUE(std::isnan(lconn->GetRttEstimate().GetAverage())); in TEST_F()
3620 EXPECT_EQ(lconn->GetRttEstimate().GetVariance(), in TEST_F()
3623 SendPingAndReceiveResponse(lconn, rconn, 10); in TEST_F()
3625 EXPECT_TRUE(lconn->writable()); in TEST_F()
3626 EXPECT_TRUE(lconn->receiving()); in TEST_F()
3627 EXPECT_EQ(lconn->GetRttEstimate().GetAverage(), 10); in TEST_F()
3628 EXPECT_EQ(lconn->GetRttEstimate().GetVariance(), in TEST_F()
3631 SendPingAndReceiveResponse(lconn, rconn, 11); in TEST_F()
3633 EXPECT_TRUE(lconn->writable()); in TEST_F()
3634 EXPECT_TRUE(lconn->receiving()); in TEST_F()
3635 EXPECT_NEAR(lconn->GetRttEstimate().GetAverage(), 10, 0.5); in TEST_F()
3636 EXPECT_LT(lconn->GetRttEstimate().GetVariance(), in TEST_F()
3639 lconn->ForgetLearnedState(); in TEST_F()
3641 EXPECT_FALSE(lconn->writable()); in TEST_F()
3642 EXPECT_FALSE(lconn->receiving()); in TEST_F()
3643 EXPECT_TRUE(std::isnan(lconn->GetRttEstimate().GetAverage())); in TEST_F()
3644 EXPECT_EQ(lconn->GetRttEstimate().GetVariance(), in TEST_F()
3649 Connection* lconn = CreateConnection(ICEROLE_CONTROLLING); in TEST_F() local
3652 SendPingAndReceiveResponse(lconn, rconn, 10); in TEST_F()
3654 EXPECT_TRUE(lconn->writable()); in TEST_F()
3655 EXPECT_TRUE(lconn->receiving()); in TEST_F()
3658 SendPingAndCaptureReply(lconn, rconn, 10, &reply); in TEST_F()
3660 lconn->ForgetLearnedState(); in TEST_F()
3662 EXPECT_FALSE(lconn->writable()); in TEST_F()
3663 EXPECT_FALSE(lconn->receiving()); in TEST_F()
3665 lconn->OnReadPacket(reply.data<char>(), reply.size(), in TEST_F()
3670 EXPECT_FALSE(lconn->writable()); in TEST_F()
3671 EXPECT_FALSE(lconn->receiving()); in TEST_F()
3674 SendPingAndReceiveResponse(lconn, rconn, 11); in TEST_F()
3675 EXPECT_TRUE(lconn->writable()); in TEST_F()
3676 EXPECT_TRUE(lconn->receiving()); in TEST_F()
3680 Connection* lconn = CreateConnection(ICEROLE_CONTROLLING); in TEST_F() local
3684 SendPingAndReceiveResponse(lconn, rconn, 10); in TEST_F()
3686 EXPECT_TRUE(lconn->writable()); in TEST_F()
3687 EXPECT_TRUE(lconn->receiving()); in TEST_F()
3690 lconn->ForgetLearnedState(); in TEST_F()
3692 EXPECT_FALSE(lconn->writable()); in TEST_F()
3693 EXPECT_FALSE(lconn->receiving()); in TEST_F()