• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // 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 "quiche/spdy/core/array_output_buffer.h"
6 
7 namespace spdy {
8 
Next(char ** data,int * size)9 void ArrayOutputBuffer::Next(char** data, int* size) {
10   *data = current_;
11   *size = capacity_ > 0 ? capacity_ : 0;
12 }
13 
AdvanceWritePtr(int64_t count)14 void ArrayOutputBuffer::AdvanceWritePtr(int64_t count) {
15   current_ += count;
16   capacity_ -= count;
17 }
18 
BytesFree() const19 uint64_t ArrayOutputBuffer::BytesFree() const { return capacity_; }
20 
21 }  // namespace spdy
22