Created
July 17, 2017 14:26
-
-
Save pfreixes/b62c199e62ae09d1a5b9e13652c7a273 to your computer and use it in GitHub Desktop.
This file contains 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
var net = require('net'); | |
var sleep = require('sleep'); | |
var client = new net.Socket(); | |
client.connect(6379, '127.0.0.1', function() { | |
console.log('Connected'); | |
sleep.sleep(10); // wait for data and RST package | |
}); | |
client.on('data', function(data) { | |
console.log('Received: ' + data); | |
}); | |
client.on('close', function() { | |
console.log('Connection closed'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output
The data in the buffer can be read event the RST already came into the system