1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add get_buffered_amount() to WebRTCDataChannel

This commit is contained in:
David Snopek
2021-07-20 11:44:40 -05:00
parent bb037de95c
commit abb45f5fe7
9 changed files with 28 additions and 0 deletions

View File

@@ -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() {
}