mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 07:36:10 -04:00
Internal change
PiperOrigin-RevId: 365062363
This commit is contained in:
@@ -511,6 +511,15 @@ bool MediumEnvironment::GetUseValidPeerConnection() {
|
||||
return use_valid_peer_connection_;
|
||||
}
|
||||
|
||||
void MediumEnvironment::SetPeerConnectionLatency(
|
||||
absl::Duration peer_connection_latency) {
|
||||
peer_connection_latency_ = peer_connection_latency;
|
||||
}
|
||||
|
||||
absl::Duration MediumEnvironment::GetPeerConnectionLatency() {
|
||||
return peer_connection_latency_;
|
||||
}
|
||||
|
||||
void MediumEnvironment::RegisterWifiLanMedium(api::WifiLanMedium& medium) {
|
||||
if (!enabled_) return;
|
||||
RunOnMediumEnvironmentThread([this, &medium]() {
|
||||
|
||||
@@ -153,6 +153,11 @@ class MediumEnvironment {
|
||||
|
||||
bool GetUseValidPeerConnection();
|
||||
|
||||
// Used to set latency when creating the peer connection in tests.
|
||||
void SetPeerConnectionLatency(absl::Duration peer_connection_latency);
|
||||
|
||||
absl::Duration GetPeerConnectionLatency();
|
||||
|
||||
// Adds medium-related info to allow for scanning/advertising to work.
|
||||
// This provides acccess to this medium from other mediums, when protocol
|
||||
// expects they should communicate.
|
||||
@@ -319,6 +324,7 @@ class MediumEnvironment {
|
||||
wifi_lan_mediums_;
|
||||
|
||||
bool use_valid_peer_connection_ = true;
|
||||
absl::Duration peer_connection_latency_ = absl::ZeroDuration();
|
||||
};
|
||||
|
||||
} // namespace nearby
|
||||
|
||||
Reference in New Issue
Block a user