diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2016-07-04 20:20:33 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2016-07-25 10:50:51 +0300 |
commit | 46633934fed7dfce289298cf16ea0f4161b77bb7 (patch) | |
tree | b0ebe706e4c45deba7e90361c19c6d30b6cac8fd /src/pipe_wrap.h | |
parent | b3127df59ab23baa68e915d62ea1997adb5669e0 (diff) |
src: pull OnConnection from pipe_wrap and tcp_wrap
One of the issues in #4641 concerns OnConnection in pipe_wrap and
tcp_wrap which are very similar with some minor difference in how
they are coded. This commit extracts OnConnection so both these
classes can share the same implementation.
PR-URL: https://github.com/nodejs/node/pull/7547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/pipe_wrap.h')
-rw-r--r-- | src/pipe_wrap.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h index f4784ac13a0..1e11221abc5 100644 --- a/src/pipe_wrap.h +++ b/src/pipe_wrap.h @@ -4,15 +4,13 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "async-wrap.h" +#include "connection_wrap.h" #include "env.h" -#include "stream_wrap.h" namespace node { -class PipeWrap : public StreamWrap { +class PipeWrap : public ConnectionWrap<PipeWrap, uv_pipe_t> { public: - uv_pipe_t* UVHandle(); - static v8::Local<v8::Object> Instantiate(Environment* env, AsyncWrap* parent); static void Initialize(v8::Local<v8::Object> target, v8::Local<v8::Value> unused, @@ -37,10 +35,7 @@ class PipeWrap : public StreamWrap { const v8::FunctionCallbackInfo<v8::Value>& args); #endif - static void OnConnection(uv_stream_t* handle, int status); static void AfterConnect(uv_connect_t* req, int status); - - uv_pipe_t handle_; }; |