Created
October 17, 2017 10:26
-
-
Save faogustavo/e37eb1bd8f9da13bbfc965d05186ba41 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
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