Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Unix Domain Sockets for Windows #2797

Closed
pvorb opened this issue Feb 21, 2012 · 3 comments
Closed

Unix Domain Sockets for Windows #2797

pvorb opened this issue Feb 21, 2012 · 3 comments
Labels

Comments

@pvorb
Copy link

pvorb commented Feb 21, 2012

With v5.0 came the support for Unix Domain Sockets for http servers. As far as I know these only work on Unix systems, where UDSs are natively supported. When I try to listen to a socket on Windows, I get an EACCESS error, no matter what I do.

Would it be possible to use Sockets on Windows too using the Winsock API? Maybe either Node.js or libuv could abstract them to a common interface.

Thoughts?

@igorzi
Copy link

igorzi commented Feb 23, 2012

@pvorb can you be more specific about "When I try to listen to a socket on Windows, I get a EACCESS error"?

There's support for named pipes. You could create a named pipe server, and listen on it. See https://github.com/joyent/node/blob/master/test/simple/test-pipe-stream.js.

@seth4618
Copy link

I can be more specific. If you name the pipe 'echo.sock' you get an eacces error. I looked in common.js referred to above and used the name in there and it worked. Some documentation about what names are legal would be helpful. Or, maybe some kind of function to make named pipes universal across systems, e.g.,

exports.cleanPipeName = function(str) {
if (process.platform === 'win32') {
str = str.replace(/^//, '');
str = str.replace(///g, '-');
return '\.\pipe'+str;
} else {
return str;
}
};

@KiNgMaR
Copy link

KiNgMaR commented Jul 31, 2012

This issue should be merged into the discussion in #3558.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants