summaryrefslogtreecommitdiff
path: root/modules/webrtc/webrtc_data_channel_js.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_js.cpp
parentbb037de95c78946746579b6d36fce78cd9b24065 (diff)
Add get_buffered_amount() to WebRTCDataChannel
Diffstat (limited to 'modules/webrtc/webrtc_data_channel_js.cpp')
-rw-r--r--modules/webrtc/webrtc_data_channel_js.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/webrtc/webrtc_data_channel_js.cpp b/modules/webrtc/webrtc_data_channel_js.cpp
index dfbec80c86..31d6a0568c 100644
--- a/modules/webrtc/webrtc_data_channel_js.cpp
+++ b/modules/webrtc/webrtc_data_channel_js.cpp
@@ -46,6 +46,7 @@ extern int godot_js_rtc_datachannel_id_get(int p_id);
extern int godot_js_rtc_datachannel_max_packet_lifetime_get(int p_id);
extern int godot_js_rtc_datachannel_max_retransmits_get(int p_id);
extern int godot_js_rtc_datachannel_is_negotiated(int p_id);
+extern int godot_js_rtc_datachannel_get_buffered_amount(int p_id);
extern char *godot_js_rtc_datachannel_label_get(int p_id); // Must free the returned string.
extern char *godot_js_rtc_datachannel_protocol_get(int p_id); // Must free the returned string.
extern void godot_js_rtc_datachannel_destroy(int p_id);
@@ -181,6 +182,10 @@ bool WebRTCDataChannelJS::is_negotiated() const {
return godot_js_rtc_datachannel_is_negotiated(_js_id);
}
+int WebRTCDataChannelJS::get_buffered_amount() const {
+ return godot_js_rtc_datachannel_get_buffered_amount(_js_id);
+}
+
WebRTCDataChannelJS::WebRTCDataChannelJS() {
}