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:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2016-06-29 21:20:54 +0300
committerAnna Henningsen <anna@addaleax.net>2016-07-28 19:00:00 +0300
commitb89605710935bbda3080c324e347f2e1ff03db71 (patch)
tree2375f5219c3e08fea97c407e9d5de32b596d0749 /src/connect_wrap.h
parentc948877688ff2b6a37f2c88724b656aae495c7b2 (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.h')
-rw-r--r--src/connect_wrap.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/connect_wrap.h b/src/connect_wrap.h
new file mode 100644
index 00000000000..28d4872d7ed
--- /dev/null
+++ b/src/connect_wrap.h
@@ -0,0 +1,26 @@
+#ifndef SRC_CONNECT_WRAP_H_
+#define SRC_CONNECT_WRAP_H_
+
+#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
+
+#include "env.h"
+#include "req-wrap.h"
+#include "async-wrap.h"
+#include "v8.h"
+
+namespace node {
+
+class ConnectWrap : public ReqWrap<uv_connect_t> {
+ public:
+ ConnectWrap(Environment* env,
+ v8::Local<v8::Object> req_wrap_obj,
+ AsyncWrap::ProviderType provider);
+
+ size_t self_size() const override { return sizeof(*this); }
+};
+
+} // namespace node
+
+#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
+
+#endif // SRC_CONNECT_WRAP_H_