summaryrefslogtreecommitdiff
path: root/ext/net/01_net.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r--ext/net/01_net.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 5b894947e..c3e5f9e5c 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -194,6 +194,20 @@ class Conn {
}
}
+class UpgradedConn extends Conn {
+ #rid = 0;
+
+ constructor(rid, remoteAddr, localAddr) {
+ super(rid, remoteAddr, localAddr);
+ ObjectDefineProperty(this, internalRidSymbol, {
+ __proto__: null,
+ enumerable: false,
+ value: rid,
+ });
+ this.#rid = rid;
+ }
+}
+
class TcpConn extends Conn {
#rid = 0;
@@ -601,5 +615,6 @@ export {
resolveDns,
TcpConn,
UnixConn,
+ UpgradedConn,
validatePort,
};