summaryrefslogtreecommitdiffstats
path: root/modules/webrtc/webrtc_data_channel_gdnative.cpp
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2021-07-20 11:44:40 -0500
committerDavid Snopek <dsnopek@gmail.com>2021-07-20 12:58:39 -0500
commitabb45f5fe7a1d5a44511675ee8695cc3859698b1 (patch)
treefe1e1ca683c10b22b44b977bd6fa73dd76a10434 /modules/webrtc/webrtc_data_channel_gdnative.cpp
parentbb037de95c78946746579b6d36fce78cd9b24065 (diff)
downloadredot-engine-abb45f5fe7a1d5a44511675ee8695cc3859698b1.tar.gz
Add get_buffered_amount() to WebRTCDataChannel
Diffstat (limited to 'modules/webrtc/webrtc_data_channel_gdnative.cpp')
-rw-r--r--modules/webrtc/webrtc_data_channel_gdnative.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/webrtc/webrtc_data_channel_gdnative.cpp b/modules/webrtc/webrtc_data_channel_gdnative.cpp
index f3009dde2f..10a3367557 100644
--- a/modules/webrtc/webrtc_data_channel_gdnative.cpp
+++ b/modules/webrtc/webrtc_data_channel_gdnative.cpp
@@ -111,6 +111,11 @@ bool WebRTCDataChannelGDNative::is_negotiated() const {
return interface->is_negotiated(interface->data);
}
+int WebRTCDataChannelGDNative::get_buffered_amount() const {
+ ERR_FAIL_COND_V(interface == NULL, 0);
+ return interface->get_buffered_amount(interface->data);
+}
+
Error WebRTCDataChannelGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);