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:
authorTimothy J Fontaine <tjfontaine@gmail.com>2012-07-13 05:25:36 +0400
committerBert Belder <bertbelder@gmail.com>2012-07-23 20:31:29 +0400
commit19d43f852e3428fe231ce662f94b154ae51254e0 (patch)
tree0d0d7f2704da8abf0570e73840135389d5547e10
parent5bb2fe660ed87c899e00ea391dbf78784a6767c1 (diff)
export HandleWrap Unref Ref in tcp/udp/timer/pipe
-rw-r--r--src/pipe_wrap.cc1
-rw-r--r--src/tcp_wrap.cc3
-rw-r--r--src/timer_wrap.cc2
-rw-r--r--src/udp_wrap.cc3
4 files changed, 9 insertions, 0 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index 2ae74ec23b0..39b21a6fab2 100644
--- a/src/pipe_wrap.cc
+++ b/src/pipe_wrap.cc
@@ -84,6 +84,7 @@ void PipeWrap::Initialize(Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(t, "close", HandleWrap::Close);
NODE_SET_PROTOTYPE_METHOD(t, "unref", HandleWrap::Unref);
+ NODE_SET_PROTOTYPE_METHOD(t, "ref", HandleWrap::Ref);
NODE_SET_PROTOTYPE_METHOD(t, "readStart", StreamWrap::ReadStart);
NODE_SET_PROTOTYPE_METHOD(t, "readStop", StreamWrap::ReadStop);
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc
index 5e6f1c2ec18..481838a5a1f 100644
--- a/src/tcp_wrap.cc
+++ b/src/tcp_wrap.cc
@@ -96,6 +96,9 @@ void TCPWrap::Initialize(Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(t, "close", HandleWrap::Close);
+ NODE_SET_PROTOTYPE_METHOD(t, "ref", HandleWrap::Ref);
+ NODE_SET_PROTOTYPE_METHOD(t, "unref", HandleWrap::Unref);
+
NODE_SET_PROTOTYPE_METHOD(t, "readStart", StreamWrap::ReadStart);
NODE_SET_PROTOTYPE_METHOD(t, "readStop", StreamWrap::ReadStop);
NODE_SET_PROTOTYPE_METHOD(t, "shutdown", StreamWrap::Shutdown);
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc
index 4332a68ba10..92964af7a3e 100644
--- a/src/timer_wrap.cc
+++ b/src/timer_wrap.cc
@@ -52,6 +52,8 @@ class TimerWrap : public HandleWrap {
constructor->SetClassName(String::NewSymbol("Timer"));
NODE_SET_PROTOTYPE_METHOD(constructor, "close", HandleWrap::Close);
+ NODE_SET_PROTOTYPE_METHOD(constructor, "ref", HandleWrap::Ref);
+ NODE_SET_PROTOTYPE_METHOD(constructor, "unref", HandleWrap::Unref);
NODE_SET_PROTOTYPE_METHOD(constructor, "start", Start);
NODE_SET_PROTOTYPE_METHOD(constructor, "stop", Stop);
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index c5f0aa76da3..2e9776b2e62 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -110,6 +110,9 @@ void UDPWrap::Initialize(Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(t, "setBroadcast", SetBroadcast);
NODE_SET_PROTOTYPE_METHOD(t, "setTTL", SetTTL);
+ NODE_SET_PROTOTYPE_METHOD(t, "ref", HandleWrap::Ref);
+ NODE_SET_PROTOTYPE_METHOD(t, "unref", HandleWrap::Unref);
+
target->Set(String::NewSymbol("UDP"),
Persistent<FunctionTemplate>::New(t)->GetFunction());
}