From 46633934fed7dfce289298cf16ea0f4161b77bb7 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 4 Jul 2016 19:20:33 +0200 Subject: 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 Reviewed-By: Trevor Norris Reviewed-By: Ben Noordhuis --- src/pipe_wrap.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/pipe_wrap.h') 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 { public: - uv_pipe_t* UVHandle(); - static v8::Local Instantiate(Environment* env, AsyncWrap* parent); static void Initialize(v8::Local target, v8::Local unused, @@ -37,10 +35,7 @@ class PipeWrap : public StreamWrap { const v8::FunctionCallbackInfo& args); #endif - static void OnConnection(uv_stream_t* handle, int status); static void AfterConnect(uv_connect_t* req, int status); - - uv_pipe_t handle_; }; -- cgit v1.2.3