blob: d501debb7e3d6287f3670c7751687ab7c6e6f71f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_peer.h"
#include <list>
#include "net/third_party/quiche/src/quic/core/quic_stream.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_stream_send_buffer_peer.h"
namespace quic {
namespace test {
// static
void QuicStreamPeer::SetWriteSideClosed(bool value, QuicStream* stream) {
stream->write_side_closed_ = value;
}
// static
void QuicStreamPeer::SetStreamBytesWritten(
QuicStreamOffset stream_bytes_written,
QuicStream* stream) {
stream->send_buffer_.stream_bytes_written_ = stream_bytes_written;
stream->send_buffer_.stream_bytes_outstanding_ = stream_bytes_written;
QuicStreamSendBufferPeer::SetStreamOffset(&stream->send_buffer_,
stream_bytes_written);
}
// static
bool QuicStreamPeer::read_side_closed(QuicStream* stream) {
return stream->read_side_closed();
}
// static
void QuicStreamPeer::CloseReadSide(QuicStream* stream) {
stream->CloseReadSide();
}
// static
bool QuicStreamPeer::StreamContributesToConnectionFlowControl(
QuicStream* stream) {
return stream->stream_contributes_to_connection_flow_control_;
}
// static
QuicStreamSequencer* QuicStreamPeer::sequencer(QuicStream* stream) {
return &(stream->sequencer_);
}
// static
QuicSession* QuicStreamPeer::session(QuicStream* stream) {
return stream->session();
}
// static
QuicStreamSendBuffer& QuicStreamPeer::SendBuffer(QuicStream* stream) {
return stream->send_buffer_;
}
} // namespace test
} // namespace quic
|