This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -730,7 +730,7 @@ QuicStream::~QuicStream() {
730
730
}
731
731
732
732
size_t QuicStream::Write (uint8_t * data, size_t length) {
733
- if (quic_stream_ && !fin_read_ && data != nullptr && length > 0 ) {
733
+ if (quic_stream_ && data != nullptr && length > 0 ) {
734
734
return quic_stream_->Write (data, length);
735
735
}
736
736
return 0 ;
@@ -752,6 +752,14 @@ size_t QuicStream::ReadableBytes() const {
752
752
}
753
753
}
754
754
755
+ uint64_t QuicStream::BufferedDataBytes () const {
756
+ if (quic_stream_) {
757
+ return quic_stream_->BufferedDataBytes ();
758
+ } else {
759
+ return 0 ;
760
+ }
761
+ }
762
+
755
763
std::shared_ptr<owt::base::QuicStream> LocalStream::Stream () {
756
764
return quic_stream_;
757
765
}
Original file line number Diff line number Diff line change @@ -207,6 +207,11 @@ class QuicStream : public owt::quic::WebTransportStreamInterface::Visitor {
207
207
@return Bytes of data available on the stream.
208
208
*/
209
209
size_t ReadableBytes () const ;
210
+ /* *
211
+ @brief Returns the amount of data pending to be sent on the stream.
212
+ @return Bytes of data pending to be sent.
213
+ */
214
+ uint64_t BufferedDataBytes () const ;
210
215
void SetVisitor (owt::quic::WebTransportStreamInterface::Visitor* visitor) {
211
216
if (quic_stream_ && visitor) {
212
217
quic_stream_->SetVisitor (visitor);
@@ -224,7 +229,6 @@ class QuicStream : public owt::quic::WebTransportStreamInterface::Visitor {
224
229
// OnFinRead the stream is no longer readable/writable
225
230
fin_read_ = true ;
226
231
can_read_ = false ;
227
- can_write_ = false ;
228
232
}
229
233
/* * @endcond */
230
234
private:
You can’t perform that action at this time.
0 commit comments