Going to add here because this was the first result i found, and it unfortunately didn't help, here's the code I'm using to create my socket listener for unix/linux and Windows
var os = require('os');
var sock = (process.platform.match(/win32/ig) ? "\\\\.\\pipe\\mysocket" : os.tmpDir()+'/mysocket.sock')
var net = require('net');
server = net.createServer(function(stream) {
stream.on('data', function(c) {
console.log("Socket Data: "+c.toString())
})
});
server.listen(sock);
You might have to unlink the socket on unix/linux/darwin based systems