DTLS transport needs to forward network route change.

Bug: webrtc:9719
Change-Id: I6746badd1f8820aa8aa98763ed74c684fa089a7e
Reviewed-on: https://webrtc-review.googlesource.com/c/118180
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26302}
This commit is contained in:
Piotr (Peter) Slatala 2019-01-17 10:02:54 -08:00 committed by Commit Bot
parent 24a164bdcf
commit 934f735528
2 changed files with 18 additions and 0 deletions

View File

@ -41,6 +41,10 @@ NoOpDtlsTransport::NoOpDtlsTransport(
this, &NoOpDtlsTransport::OnWritableState);
ice_transport_->SignalReadyToSend.connect(this,
&NoOpDtlsTransport::OnReadyToSend);
ice_transport_->SignalReceivingState.connect(
this, &NoOpDtlsTransport::OnReceivingState);
ice_transport_->SignalNetworkRouteChanged.connect(
this, &NoOpDtlsTransport::OnNetworkRouteChanged);
}
NoOpDtlsTransport::~NoOpDtlsTransport() {}
@ -140,4 +144,16 @@ int NoOpDtlsTransport::GetError() {
return ice_transport_->GetError();
}
void NoOpDtlsTransport::OnNetworkRouteChanged(
absl::optional<rtc::NetworkRoute> network_route) {
RTC_DCHECK_RUN_ON(&thread_checker_);
SignalNetworkRouteChanged(network_route);
}
void NoOpDtlsTransport::OnReceivingState(
rtc::PacketTransportInternal* transport) {
RTC_DCHECK_RUN_ON(&thread_checker_);
SignalReceivingState(this);
}
} // namespace cricket

View File

@ -89,6 +89,8 @@ class NoOpDtlsTransport : public DtlsTransportInternal {
private:
void OnReadyToSend(rtc::PacketTransportInternal* transport);
void OnWritableState(rtc::PacketTransportInternal* transport);
void OnNetworkRouteChanged(absl::optional<rtc::NetworkRoute> network_route);
void OnReceivingState(rtc::PacketTransportInternal* transport);
int SendPacket(const char* data,
size_t len,