chromium/google_apis/gcm/base/socket_stream.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "google_apis/gcm/base/socket_stream.h"

#include <algorithm>
#include <cstddef>
#include <cstring>

#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/numerics/safe_conversions.h"
#include "net/base/io_buffer.h"
#include "net/socket/stream_socket.h"

namespace gcm {

namespace {

// TODO(zea): consider having dynamically-sized buffers if this becomes too
// expensive.
const size_t kDefaultBufferSize =;

}  // namespace

SocketInputStream::SocketInputStream(mojo::ScopedDataPipeConsumerHandle stream)
    :{}

SocketInputStream::~SocketInputStream() {}

bool SocketInputStream::Next(const void** data, int* size) {}

void SocketInputStream::BackUp(int count) {}

bool SocketInputStream::Skip(int count) {}

int64_t SocketInputStream::ByteCount() const {}

int SocketInputStream::UnreadByteCount() const {}

net::Error SocketInputStream::Refresh(base::OnceClosure callback,
                                      int byte_limit) {}

void SocketInputStream::ReadMore(
    MojoResult result,
    const mojo::HandleSignalsState& /* ignored */) {}

void SocketInputStream::RebuildBuffer() {}

net::Error SocketInputStream::last_error() const {}

SocketInputStream::State SocketInputStream::GetState() const {}

void SocketInputStream::ResetInternal() {}

void SocketInputStream::CloseStream(net::Error error) {}

SocketOutputStream::SocketOutputStream(
    mojo::ScopedDataPipeProducerHandle stream)
    :{}

SocketOutputStream::~SocketOutputStream() {}

bool SocketOutputStream::Next(void** data, int* size) {}

void SocketOutputStream::BackUp(int count) {}

int64_t SocketOutputStream::ByteCount() const {}

net::Error SocketOutputStream::Flush(base::OnceClosure callback) {}

void SocketOutputStream::WriteMore(MojoResult result,
                                   const mojo::HandleSignalsState& state) {}

SocketOutputStream::State SocketOutputStream::GetState() const{}

net::Error SocketOutputStream::last_error() const {}

}  // namespace gcm