summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/http.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts
index 9654d3beb..2da19f7f5 100644
--- a/ext/node/polyfills/http.ts
+++ b/ext/node/polyfills/http.ts
@@ -283,10 +283,16 @@ const kError = Symbol("kError");
const kUniqueHeaders = Symbol("kUniqueHeaders");
class FakeSocket extends EventEmitter {
- constructor(opts = {}) {
+ constructor(
+ opts: {
+ encrypted?: boolean | undefined;
+ remotePort?: number | undefined;
+ remoteAddress?: string | undefined;
+ } = {},
+ ) {
super();
- this.remoteAddress = opts.hostname;
- this.remotePort = opts.port;
+ this.remoteAddress = opts.remoteAddress;
+ this.remotePort = opts.remotePort;
this.encrypted = opts.encrypted;
this.writable = true;
this.readable = true;