coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.83k stars 356 forks source link

Pipe Stream Connection #332

Closed adamwpe closed 1 year ago

adamwpe commented 1 year ago

I'm having an issue where PIPE stream does not accepts connections (from another program) when ran from this windows service.

e.g.

let PIPE_NAME = "example";
let PIPE_PATH = "\\\\.\\pipe\\" + PIPE_NAME;

let server = net.createServer(function (stream) {
    // NEVER GET A CONNECTION
    console.log('Server: on connection')
});
server.listen(PIPE_PATH, function () {
    console.log('Server: on listening');
})

`

It works if I run this code via manually (not using a windows service).

Is it something to do with the user settings when creating the service? Any ideas?

It does appear to be working, as I do log that it is listening.

Thanks,