summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-21 23:23:49 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:34:01 -0800
commit64ec3cb19ffeeb25d7d235e60629c9b4890986f1 (patch)
tree95891ed754a81f2149148e64f62fca72d105ce6e /indra/llwebrtc
parent3f1fa296696086efe618bdbd3c6f636b6e1163b1 (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.cpp17
-rw-r--r--indra/llwebrtc/llwebrtc.h1
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