From abb45f5fe7a1d5a44511675ee8695cc3859698b1 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Tue, 20 Jul 2021 11:44:40 -0500 Subject: Add get_buffered_amount() to WebRTCDataChannel --- modules/webrtc/webrtc_data_channel_gdnative.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/webrtc/webrtc_data_channel_gdnative.cpp') 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); -- cgit v1.2.3