Skip to content

Instantly share code, notes, and snippets.

@faogustavo
Created October 17, 2017 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faogustavo/e37eb1bd8f9da13bbfc965d05186ba41 to your computer and use it in GitHub Desktop.
Save faogustavo/e37eb1bd8f9da13bbfc965d05186ba41 to your computer and use it in GitHub Desktop.
const net = require('net');
var client = new net.Socket();
client.connect(13854, '127.0.0.1', function () {
console.log('Connected');
client.write(JSON.stringify({
enableRawOutput: false,
format: "Json"
}));
});
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