diff options
author | Roxie Linden <roxie@lindenlab.com> | 2023-09-21 23:23:49 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-22 23:11:34 -0800 |
commit | 4624184f97a94cd99df3640f5fc1e596c30bbffe (patch) | |
tree | 1fff50bd81c97caff9024efcb56002442eb55e1d /indra/llwebrtc | |
parent | dc56d0104d1c54fd2b9c6925cefbeac04eadcca8 (diff) |
send a message to the server when we're ready for data channel data
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 17 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc.h | 1 |
2 files changed, 16 insertions, 2 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 1913786c0b..dc746b7629 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -78,13 +78,22 @@ void LLWebRTCImpl::terminate() mPeerConnection->Close(); mPeerConnection = nullptr; } + mPeerConnectionFactory = nullptr; }); mWorkerThread->BlockingCall( [this]() { - if (mDeviceModule) + mDeviceModule = nullptr; + mTaskQueueFactory = nullptr; + + }); + mNetworkThread->BlockingCall( + [this]() + { + if (mDataChannel) { - mDeviceModule = nullptr; + mDataChannel->Close(); + mDataChannel = nullptr; } }); } @@ -681,6 +690,10 @@ void LLWebRTCImpl::OnStateChange() { case webrtc::DataChannelInterface::kOpen: RTC_LOG(LS_INFO) << __FUNCTION__ << " Data Channel State Open"; + for (auto &observer : mDataObserverList) + { + observer->OnDataChannelReady(); + } break; case webrtc::DataChannelInterface::kConnecting: RTC_LOG(LS_INFO) << __FUNCTION__ << " Data Channel State Connecting"; diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index f1ba1620e3..d0d2834e3c 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -109,6 +109,7 @@ class LLWebRTCDataObserver { public: virtual void OnDataReceived(const std::string& data, bool binary) = 0; + virtual void OnDataChannelReady() = 0; }; class LLWebRTCDataInterface |