'Error: [4092] permission denied' raised after calling socket bind pipe on windows
forchid opened this issue · 3 comments
forchid commented
Windows 10.
Test case
let server = new net.Socket(net.AF_PIPE);
server.bind('pipe://./pipe/proc1');
server.listen();
lhkzh commented
try like this
var path = "//./pipe/proc1"; // 'pipe://./pipe/proc1'
forchid commented
"//./pipe/proc1"
It works. But the document isn't correct in fibjs website. @lhkzh Thank you!
forchid commented
Oh, it's my problem! The static Stream net.connect(String url, Integer timeout = 0)
needs 'pipe:' prefix(eg. 'pipe://./pipe/proc1'), but those instance methods Socket.bind(String addr, Integer port = 0, Boolean allowIPv4 = true)
or Socket.connect(String host, Integer port = 0)
don't need this prefix(eg. '//./pipe/proc1')!