blob: 1a6eae7c1f8f993e93dd201e6348037237fb9c02 (
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
|
// Copyright 2014 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/quic/test_tools/quic_stream_sequencer_peer.h"
#include "net/quic/quic_stream_sequencer.h"
using std::map;
using std::string;
namespace net {
namespace test {
// static
size_t QuicStreamSequencerPeer::GetNumBufferedBytes(
QuicStreamSequencer* sequencer) {
return sequencer->buffered_frames_.BytesBuffered();
}
// static
bool QuicStreamSequencerPeer::FrameOverlapsBufferedData(
QuicFrameList* buffer,
const QuicStreamFrame& frame) {
list<QuicFrameList::FrameData>::iterator it =
buffer->FindInsertionPoint(frame.offset, frame.frame_length);
return buffer->FrameOverlapsBufferedData(frame.offset, frame.frame_length,
it);
}
// static
QuicStreamOffset QuicStreamSequencerPeer::GetCloseOffset(
QuicStreamSequencer* sequencer) {
return sequencer->close_offset_;
}
} // namespace test
} // namespace net
|