blob: ea82eb0006ff5a70edacd6830f6af0a2dde6bf86 [file] [log] [blame]
QUICHE team82dee2f2019-01-18 12:35:12 -05001// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/third_party/quiche/src/spdy/core/array_output_buffer.h"
6
7namespace spdy {
8
9void ArrayOutputBuffer::Next(char** data, int* size) {
10 *data = current_;
11 *size = capacity_ > 0 ? capacity_ : 0;
12}
13
14void ArrayOutputBuffer::AdvanceWritePtr(int64_t count) {
15 current_ += count;
16 capacity_ -= count;
17}
18
19uint64_t ArrayOutputBuffer::BytesFree() const {
20 return capacity_;
21}
22
23} // namespace spdy