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 #include <cstdint> 8 9 namespace spdy { 10 Next(char ** data,int * size)11void ArrayOutputBuffer::Next(char** data, int* size) { 12 *data = current_; 13 *size = capacity_ > 0 ? capacity_ : 0; 14 } 15 AdvanceWritePtr(int64_t count)16void ArrayOutputBuffer::AdvanceWritePtr(int64_t count) { 17 current_ += count; 18 capacity_ -= count; 19 } 20 BytesFree() const21uint64_t ArrayOutputBuffer::BytesFree() const { return capacity_; } 22 23 } // namespace spdy 24