Skip to content

Instantly share code, notes, and snippets.

@dshaw
Created June 26, 2012 03:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dshaw/9f93cdcd3a77b9142e51 to your computer and use it in GitHub Desktop.
Save dshaw/9f93cdcd3a77b9142e51 to your computer and use it in GitHub Desktop.
net.js UNIX domain socket issue
var net = require('net');
var path = '/tmp/echo.sock';
var server = net.createServer(function(c) {
console.log('server connected');
c.on('end', function() {
console.log('server disconnected');
});
c.write('hello\r\n');
c.pipe(c);
});
server.listen(path, function() {
console.log('server bound on %s', path);
});
@Globik
Copy link

Globik commented May 17, 2018

And now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment