mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 09:46:09 +03:00
22 lines
1022 B
Plaintext
22 lines
1022 B
Plaintext
|
// Copyright 2017 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.
|
||
|
|
||
|
module network.mojom;
|
||
|
|
||
|
// An interface that can vend a data pipe multiple times. You can think of it
|
||
|
// as backed by content like a Blob that can be read multiple times.
|
||
|
interface DataPipeGetter {
|
||
|
// Reads all the content, writing into |pipe|. Calls the callback with |size|
|
||
|
// once the size of the content is known. The callback must be invoked before
|
||
|
// writing to |pipe|, since the size needs to be known to generate the
|
||
|
// Content-Length request header. If an error occurred before the size was
|
||
|
// known, the callback is instead called with the net::Error |status|.
|
||
|
Read(handle<data_pipe_producer> pipe) => (int32 status, uint64 size);
|
||
|
|
||
|
// Makes a clone so there can be multiple handles to this interface. This
|
||
|
// doesn't imply the data itself is cloned: this can be an inexpensive
|
||
|
// operation.
|
||
|
Clone(DataPipeGetter& request);
|
||
|
};
|