diff options
author | Jon Moss <me@jonathanmoss.me> | 2018-07-11 20:53:05 +0300 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2018-07-13 19:08:20 +0300 |
commit | 45732c7c19672869a7e517e252c83b371a863bee (patch) | |
tree | 14b333f5a45f53bec769cd0b60c2201b1ba46049 /src/udp_wrap.cc | |
parent | d2ee7d64aa3afd593ec8c0b14f497244403c5589 (diff) |
src: add HandleWrap::AddWrapMethods
Extracts common setters to a single location
PR-URL: https://github.com/nodejs/node/pull/21769
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r-- | src/udp_wrap.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 1d1ded449bd..2ef6732213c 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -115,7 +115,6 @@ void UDPWrap::Initialize(Local<Object> target, env->SetProtoMethod(t, "send", Send); env->SetProtoMethod(t, "bind6", Bind6); env->SetProtoMethod(t, "send6", Send6); - env->SetProtoMethod(t, "close", Close); env->SetProtoMethod(t, "recvStart", RecvStart); env->SetProtoMethod(t, "recvStop", RecvStop); env->SetProtoMethod(t, "getsockname", @@ -129,11 +128,8 @@ void UDPWrap::Initialize(Local<Object> target, env->SetProtoMethod(t, "setTTL", SetTTL); env->SetProtoMethod(t, "bufferSize", BufferSize); - env->SetProtoMethod(t, "ref", HandleWrap::Ref); - env->SetProtoMethod(t, "unref", HandleWrap::Unref); - env->SetProtoMethod(t, "hasRef", HandleWrap::HasRef); - AsyncWrap::AddWrapMethods(env, t); + HandleWrap::AddWrapMethods(env, t); target->Set(udpString, t->GetFunction()); env->set_udp_constructor_function(t->GetFunction()); |