Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-03-12 17:02:28 +0300
committerJames M Snell <jasnell@gmail.com>2020-02-27 02:34:23 +0300
commitb44c63b87e6c165844f7303a9ec6f8c0cce7d3dc (patch)
treefd50abef76272cf8da042bf51d272119923a47e9 /src/stream_pipe.h
parentb2be348fcce7efd30f88b9fabbb2e9629b534e20 (diff)
src: enable `StreamPipe` for generic `StreamBase`s
Originally landed in the nodejs/quic repo and used there for file sending. Original review: ``` PR-URL: https://github.com/nodejs/quic/pull/150 Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: https://github.com/nodejs/node/pull/31869 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/stream_pipe.h')
-rw-r--r--src/stream_pipe.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stream_pipe.h b/src/stream_pipe.h
index 0e155006102..e22abab0115 100644
--- a/src/stream_pipe.h
+++ b/src/stream_pipe.h
@@ -17,6 +17,8 @@ class StreamPipe : public AsyncWrap {
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Start(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Unpipe(const v8::FunctionCallbackInfo<v8::Value>& args);
+ static void IsClosed(const v8::FunctionCallbackInfo<v8::Value>& args);
+ static void PendingWrites(const v8::FunctionCallbackInfo<v8::Value>& args);
SET_NO_MEMORY_INFO()
SET_MEMORY_INFO_NAME(StreamPipe)
@@ -26,14 +28,13 @@ class StreamPipe : public AsyncWrap {
inline StreamBase* source();
inline StreamBase* sink();
- inline void ShutdownWritable();
-
+ int pending_writes_ = 0;
bool is_reading_ = false;
- bool is_writing_ = false;
bool is_eof_ = false;
bool is_closed_ = true;
bool sink_destroyed_ = false;
bool source_destroyed_ = false;
+ bool uses_wants_write_ = false;
// Set a default value so that when we’re coming from Start(), we know
// that we don’t want to read just yet.