/* * Copyright 2024 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.
*/
// Provide a different base address.
address.SetIP("100.100.100.1");
c.ComputeFoundation(address, 1); // Same tiebreaker as for foundation1.
foundation2 = c.foundation();
EXPECT_NE(foundation1, foundation2);
// Consistency check (just in case the algorithm ever changes to random!).
c.ComputeFoundation(c.address(), 1);
foundation2 = c.foundation();
EXPECT_EQ(foundation1, foundation2);
// Changing the protocol should affect the foundation. auto prev_protocol = c.protocol();
c.set_protocol("tcp");
ASSERT_NE(prev_protocol, c.protocol());
c.ComputeFoundation(c.address(), 1);
EXPECT_NE(foundation1, c.foundation());
c.set_protocol(prev_protocol);
// Changing the relay protocol should affect the foundation.
prev_protocol = c.relay_protocol();
c.set_relay_protocol("tcp");
ASSERT_NE(prev_protocol, c.relay_protocol());
c.ComputeFoundation(c.address(), 1);
EXPECT_NE(foundation1, c.foundation());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.