| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6095fb0 commit 00cca48
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,6 +67,7 @@ class ExternalReferenceRegistry { | |||
| 67 | 67 | V(process_object) \ | |
| 68 | 68 | V(report) \ | |
| 69 | 69 | V(task_queue) \ | |
| 70 | + V(tcp_wrap) \ | ||
| 70 | 71 | V(url) \ | |
| 71 | 72 | V(util) \ | |
| 72 | 73 | V(serdes) \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,12 +21,13 @@ | |||
| 21 | 21 | ||
| 22 | 22 | #include "tcp_wrap.h" | |
| 23 | 23 | ||
| 24 | + #include "connect_wrap.h" | ||
| 24 | 25 | #include "connection_wrap.h" | |
| 25 | 26 | #include "env-inl.h" | |
| 26 | 27 | #include "handle_wrap.h" | |
| 27 | 28 | #include "node_buffer.h" | |
| 29 | + #include "node_external_reference.h" | ||
| 28 | 30 | #include "node_internals.h" | |
| 29 | - #include "connect_wrap.h" | ||
| 30 | 31 | #include "stream_base-inl.h" | |
| 31 | 32 | #include "stream_wrap.h" | |
| 32 | 33 | #include "util-inl.h" | |
@@ -120,6 +121,23 @@ void TCPWrap::Initialize(Local<Object> target, | |||
| 120 | 121 | constants).Check(); | |
| 121 | 122 | } | |
| 122 | 123 | ||
| 124 | + void TCPWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) { | ||
| 125 | + registry->Register(New); | ||
| 126 | + registry->Register(Open); | ||
| 127 | + registry->Register(Bind); | ||
| 128 | + registry->Register(Listen); | ||
| 129 | + registry->Register(Connect); | ||
| 130 | + registry->Register(Bind6); | ||
| 131 | + registry->Register(Connect6); | ||
| 132 | + | ||
| 133 | + registry->Register(GetSockOrPeerName<TCPWrap, uv_tcp_getsockname>); | ||
| 134 | + registry->Register(GetSockOrPeerName<TCPWrap, uv_tcp_getpeername>); | ||
| 135 | + registry->Register(SetNoDelay); | ||
| 136 | + registry->Register(SetKeepAlive); | ||
| 137 | + #ifdef _WIN32 | ||
| 138 | + registry->Register(SetSimultaneousAccepts); | ||
| 139 | + #endif | ||
| 140 | + } | ||
| 123 | 141 | ||
| 124 | 142 | void TCPWrap::New(const FunctionCallbackInfo<Value>& args) { | |
| 125 | 143 | // This constructor should not be exposed to public javascript. | |
@@ -393,3 +411,5 @@ Local<Object> AddressToJS(Environment* env, | |||
| 393 | 411 | } // namespace node | |
| 394 | 412 | ||
| 395 | 413 | NODE_MODULE_CONTEXT_AWARE_INTERNAL(tcp_wrap, node::TCPWrap::Initialize) | |
| 414 | + NODE_MODULE_EXTERNAL_REFERENCE(tcp_wrap, | ||
| 415 | + node::TCPWrap::RegisterExternalReferences) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | 30 | namespace node { | |
| 31 | 31 | ||
| 32 | + class ExternalReferenceRegistry; | ||
| 32 | 33 | class Environment; | |
| 33 | 34 | ||
| 34 | 35 | class TCPWrap : public ConnectionWrap<TCPWrap, uv_tcp_t> { | |
@@ -45,6 +46,7 @@ class TCPWrap : public ConnectionWrap<TCPWrap, uv_tcp_t> { | |||
| 45 | 46 | v8::Local<v8::Value> unused, | |
| 46 | 47 | v8::Local<v8::Context> context, | |
| 47 | 48 | void* priv); | |
| 49 | + static void RegisterExternalReferences(ExternalReferenceRegistry* registry); | ||
| 48 | 50 | ||
| 49 | 51 | SET_NO_MEMORY_INFO() | |
| 50 | 52 | SET_SELF_SIZE(TCPWrap) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments