var net = require('net');
var client = new net.Socket();
client.connect(3333, 'localhost', function() {
console.log('Connected');
client.write('Hello, server! Love, Client.');
});
client.on('data', function(data) {
console.log('Received: ' + data.toString());
//client.destroy();
});
client.on('close', function() {
console.log('Connection closed');
});