diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-02-09 19:20:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 19:20:56 +0100 |
commit | c6b6f7e18cccb1c8e219dc262c52dccf58c9c90b (patch) | |
tree | 42de960838ce444a1c5ded501e4f8faac3379c7f /src/WebRTCLibDataChannel.cpp | |
parent | d7032f7b852e2e0acfc6cc1cdd1a17238529abac (diff) | |
parent | 00f952bcf1f886d6bcb58a162e5c157ad26d4945 (diff) | |
download | fork-godot-webrtc-native-c6b6f7e18cccb1c8e219dc262c52dccf58c9c90b.tar.gz fork-godot-webrtc-native-c6b6f7e18cccb1c8e219dc262c52dccf58c9c90b.tar.bz2 fork-godot-webrtc-native-c6b6f7e18cccb1c8e219dc262c52dccf58c9c90b.zip |
Merge pull request #87 from Faless/bump/rc1
Update to Godot 4.0 rc1.
Diffstat (limited to 'src/WebRTCLibDataChannel.cpp')
-rw-r--r-- | src/WebRTCLibDataChannel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WebRTCLibDataChannel.cpp b/src/WebRTCLibDataChannel.cpp index d4ded1e..dd51ded 100644 --- a/src/WebRTCLibDataChannel.cpp +++ b/src/WebRTCLibDataChannel.cpp @@ -136,17 +136,17 @@ bool WebRTCLibDataChannel::_is_ordered() const { return channel->reliability().unordered == false; } -int64_t WebRTCLibDataChannel::_get_id() const { +int32_t WebRTCLibDataChannel::_get_id() const { ERR_FAIL_COND_V(!channel, -1); return channel->id().value_or(-1); } -int64_t WebRTCLibDataChannel::_get_max_packet_life_time() const { +int32_t WebRTCLibDataChannel::_get_max_packet_life_time() const { ERR_FAIL_COND_V(!channel, 0); return channel->reliability().type == rtc::Reliability::Type::Timed ? std::get<std::chrono::milliseconds>(channel->reliability().rexmit).count() : -1; } -int64_t WebRTCLibDataChannel::_get_max_retransmits() const { +int32_t WebRTCLibDataChannel::_get_max_retransmits() const { ERR_FAIL_COND_V(!channel, 0); return channel->reliability().type == rtc::Reliability::Type::Rexmit ? std::get<int>(channel->reliability().rexmit) : -1; } @@ -161,7 +161,7 @@ bool WebRTCLibDataChannel::_is_negotiated() const { return negotiated; } -int64_t WebRTCLibDataChannel::_get_buffered_amount() const { +int32_t WebRTCLibDataChannel::_get_buffered_amount() const { ERR_FAIL_COND_V(!channel, 0); return channel->bufferedAmount(); } @@ -194,7 +194,7 @@ Error WebRTCLibDataChannel::_get_packet(const uint8_t **r_buffer, int32_t *r_len return OK; } -Error WebRTCLibDataChannel::_put_packet(const uint8_t *p_buffer, int64_t p_len) try { +Error WebRTCLibDataChannel::_put_packet(const uint8_t *p_buffer, int32_t p_len) try { ERR_FAIL_COND_V(!channel, FAILED); ERR_FAIL_COND_V(channel->isClosed(), FAILED); if (write_mode == WRITE_MODE_TEXT) { @@ -212,11 +212,11 @@ Error WebRTCLibDataChannel::_put_packet(const uint8_t *p_buffer, int64_t p_len) ERR_FAIL_V(FAILED); } -int64_t WebRTCLibDataChannel::_get_available_packet_count() const { +int32_t WebRTCLibDataChannel::_get_available_packet_count() const { return packet_queue.size(); } -int64_t WebRTCLibDataChannel::_get_max_packet_size() const { +int32_t WebRTCLibDataChannel::_get_max_packet_size() const { return 16384; // See RFC-8831 section 6.6: https://datatracker.ietf.org/doc/rfc8831/ } |