summaryrefslogtreecommitdiff
path: root/modules/webrtc/webrtc_data_channel_gdnative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/webrtc/webrtc_data_channel_gdnative.cpp')
-rw-r--r--modules/webrtc/webrtc_data_channel_gdnative.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/webrtc/webrtc_data_channel_gdnative.cpp b/modules/webrtc/webrtc_data_channel_gdnative.cpp
index d4cf464c7c..10a3367557 100644
--- a/modules/webrtc/webrtc_data_channel_gdnative.cpp
+++ b/modules/webrtc/webrtc_data_channel_gdnative.cpp
@@ -31,6 +31,7 @@
#ifdef WEBRTC_GDNATIVE_ENABLED
#include "webrtc_data_channel_gdnative.h"
+
#include "core/io/resource_loader.h"
#include "modules/gdnative/nativescript/nativescript.h"
@@ -110,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);