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.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 9cdcdb78c..f2bf5e7df 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -19,6 +19,7 @@ const {
ObjectPrototypeIsPrototypeOf,
PromiseResolve,
SymbolAsyncIterator,
+ Symbol,
SymbolFor,
TypeError,
TypedArrayPrototypeSubarray,
@@ -416,6 +417,8 @@ class Datagram {
}
}
+const listenOptionApiName = Symbol("listenOptionApiName");
+
function listen(args) {
switch (args.transport ?? "tcp") {
case "tcp": {
@@ -427,7 +430,10 @@ function listen(args) {
return new Listener(rid, addr);
}
case "unix": {
- const { 0: rid, 1: path } = ops.op_net_listen_unix(args.path);
+ const { 0: rid, 1: path } = ops.op_net_listen_unix(
+ args.path,
+ args[listenOptionApiName] ?? "Deno.listen",
+ );
const addr = {
transport: "unix",
path,
@@ -505,6 +511,7 @@ export {
Datagram,
listen,
Listener,
+ listenOptionApiName,
resolveDns,
shutdown,
TcpConn,