Created
October 15, 2014 07:57
-
-
Save goloroden/4621d7c1f49b3d8b8a33 to your computer and use it in GitHub Desktop.
Listen for data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var net = require('net'); | |
net.createServer(function (socket) { | |
socket.resume(); | |
socket.once('end', function () { | |
socket.removeAllListeners(); | |
}); | |
}).listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment