Open DjDeveloperr opened 3 years ago
AF_UNIX
; mapping {transport: "unix"}
to a named pipe seems less than obvious.I wasn't aware Windows supports AF_UNIX, but transport: "unix"
doesn't seem to work at all in Windows (I'm on Windows 10). I tried it with existent named pipe, file, and a non-existent path, all I got is:
Uncaught TypeError: Error parsing args: data did not match any variant of untagged enum ArgsEnum
at unwrapOpResult (deno:core/core.js:100:13)
at Object.opAsync (deno:core/core.js:109:28)
at Object.opConnect (deno:runtime/js/30_net.js:22:17)
at Object.connect (deno:runtime/js/40_net_unstable.js:37:29)
at <anonymous>:2:23
but it shows correct error on WSL when I try to connect:
Uncaught NotFound: No such file or directory (os error 2)
at unwrapOpResult (deno:core/core.js:100:13)
at async Object.connect (deno:runtime/js/40_net_unstable.js:37:19)
at async <anonymous>:2:12
fallback to TCPIP
fallback to TCPIP
The application I'm trying to interact with through named pipes does not support that.
Tokio supports named pipes now, so this should be unblocked: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.7.0
Tokio supports named pipes now, so this should be unblocked: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.7.0
Would a PR be welcome to add new transport for named pipes? I'm going to give this a try
Why?
Currently,
Deno.connect
only supports IPC for unix (using unstabletransport: "unix"
). There should be named pipes support too, which would allow IPC on Windows (as NodeJS'net
mode does, it supports both, reference).Additional info
I have tried using
Deno.open
but it doesn't work too well here. A native addon to Deno.connect would be way better.