GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: register external references of TCPWrap for snapshot · ide/node@995f945

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_external_reference.h
    • tcp_wrap.cc
    • tcp_wrap.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_external_reference.h‎

Copy file name to clipboardExpand all lines: src/node_external_reference.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class ExternalReferenceRegistry {
6767
V(process_object) \
6868
V(report) \
6969
V(task_queue) \
70+
V(tcp_wrap) \
7071
V(url) \
7172
V(util) \
7273
V(serdes) \
Collapse file

‎src/tcp_wrap.cc‎

Copy file name to clipboardExpand all lines: src/tcp_wrap.cc
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121

2222
#include "tcp_wrap.h"
2323

24+
#include "connect_wrap.h"
2425
#include "connection_wrap.h"
2526
#include "env-inl.h"
2627
#include "handle_wrap.h"
2728
#include "node_buffer.h"
29+
#include "node_external_reference.h"
2830
#include "node_internals.h"
29-
#include "connect_wrap.h"
3031
#include "stream_base-inl.h"
3132
#include "stream_wrap.h"
3233
#include "util-inl.h"
@@ -120,6 +121,23 @@ void TCPWrap::Initialize(Local<Object> target,
120121
constants).Check();
121122
}
122123

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+
}
123141

124142
void TCPWrap::New(const FunctionCallbackInfo<Value>& args) {
125143
// This constructor should not be exposed to public javascript.
@@ -393,3 +411,5 @@ Local<Object> AddressToJS(Environment* env,
393411
} // namespace node
394412

395413
NODE_MODULE_CONTEXT_AWARE_INTERNAL(tcp_wrap, node::TCPWrap::Initialize)
414+
NODE_MODULE_EXTERNAL_REFERENCE(tcp_wrap,
415+
node::TCPWrap::RegisterExternalReferences)
Collapse file

‎src/tcp_wrap.h‎

Copy file name to clipboardExpand all lines: src/tcp_wrap.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
namespace node {
3131

32+
class ExternalReferenceRegistry;
3233
class Environment;
3334

3435
class TCPWrap : public ConnectionWrap<TCPWrap, uv_tcp_t> {
@@ -45,6 +46,7 @@ class TCPWrap : public ConnectionWrap<TCPWrap, uv_tcp_t> {
4546
v8::Local<v8::Value> unused,
4647
v8::Local<v8::Context> context,
4748
void* priv);
49+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
4850

4951
SET_NO_MEMORY_INFO()
5052
SET_SELF_SIZE(TCPWrap)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.