diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2016-06-29 21:20:54 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2016-07-28 19:00:00 +0300 |
commit | b89605710935bbda3080c324e347f2e1ff03db71 (patch) | |
tree | 2375f5219c3e08fea97c407e9d5de32b596d0749 /src/connect_wrap.cc | |
parent | c948877688ff2b6a37f2c88724b656aae495c7b2 (diff) |
src: unifying PipeConnectWrap and TCPConnectWrap
This commit attempts to address one of the items in #4641 which is
related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both
pipe_wrap.cc and tcp_wrap.cc contain a class that are almost
identical. This commit extracts these parts into a separate class
that both can share.
PR-URL: https://github.com/nodejs/node/pull/7501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/connect_wrap.cc')
-rw-r--r-- | src/connect_wrap.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/connect_wrap.cc b/src/connect_wrap.cc new file mode 100644 index 00000000000..df3f093e732 --- /dev/null +++ b/src/connect_wrap.cc @@ -0,0 +1,22 @@ +#include "connect_wrap.h" + +#include "env.h" +#include "env-inl.h" +#include "req-wrap.h" +#include "req-wrap-inl.h" +#include "util.h" +#include "util-inl.h" + +namespace node { + +using v8::Local; +using v8::Object; + + +ConnectWrap::ConnectWrap(Environment* env, + Local<Object> req_wrap_obj, + AsyncWrap::ProviderType provider) : ReqWrap(env, req_wrap_obj, provider) { + Wrap(req_wrap_obj, this); +} + +} // namespace node |