From 3bdf6cdc1320dfd7ac0f1704976a633ef3c911d8 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Tue, 20 Jul 2021 11:54:25 -0500 Subject: Add get_buffered_amount() to WebRTCDataChannel --- src/WebRTCLibDataChannel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/WebRTCLibDataChannel.cpp') diff --git a/src/WebRTCLibDataChannel.cpp b/src/WebRTCLibDataChannel.cpp index f29d562..bab9c79 100644 --- a/src/WebRTCLibDataChannel.cpp +++ b/src/WebRTCLibDataChannel.cpp @@ -144,6 +144,11 @@ bool WebRTCLibDataChannel::is_negotiated() const { return channel->negotiated(); } +int WebRTCLibDataChannel::get_buffered_amount() const { + ERR_FAIL_COND_V(channel.get() == nullptr, 0); + return channel->buffered_amount(); +} + godot_error WebRTCLibDataChannel::poll() { return GODOT_OK; } -- cgit v1.2.3