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>2017-10-18 01:38:19 +0300
committerAnna Henningsen <anna@addaleax.net>2017-10-23 17:50:42 +0300
commit170bc3166963a9d8811b5bcdd45de6b12827f55c (patch)
tree4936e1d6261a3653811b1acff7e35a232629767b /src/js_stream.h
parent127f83ab8d243d1c248b1fa7373c5f58426696f1 (diff)
src: turn JS stream into a full duplex
Remove unused methods for reading data from `JSStream` and add those required for emitting data or an EOF event to the JS side, in essentially the same way that `LibuvStreamWrap` does it. PR-URL: https://github.com/nodejs/node/pull/16269 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/js_stream.h')
-rw-r--r--src/js_stream.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/js_stream.h b/src/js_stream.h
index fc0b7abe15a..a4a67ae3372 100644
--- a/src/js_stream.h
+++ b/src/js_stream.h
@@ -38,12 +38,16 @@ class JSStream : public AsyncWrap, public StreamBase {
AsyncWrap* GetAsyncWrap() override;
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void DoAlloc(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void DoRead(const v8::FunctionCallbackInfo<v8::Value>& args);
static void DoAfterWrite(const v8::FunctionCallbackInfo<v8::Value>& args);
static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
static void EmitEOF(const v8::FunctionCallbackInfo<v8::Value>& args);
+ static void OnAllocImpl(size_t size, uv_buf_t* buf, void* ctx);
+ static void OnReadImpl(ssize_t nread,
+ const uv_buf_t* buf,
+ uv_handle_type pending,
+ void* ctx);
+
template <class Wrap>
static void Finish(const v8::FunctionCallbackInfo<v8::Value>& args);
};