|
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) |
0 commit comments