Commit 7ee29d1d authored by Maciej Małecki's avatar Maciej Małecki Committed by koichik
Browse files

net: `Server.listen`, `Server.close` and `Socket.connect` return `this`

Just a syntactic sugar for doing, for example:

    var server = net.createServer(function (c) {
      c.end('goodbye, cruel world!\r\n');
      server.close().on('close', function () {
        console.log('really, goodbye!');
      });
    }).listen(1337);

Fixes #1922.
parent 00aa8935
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment