Created
July 9, 2015 15:21
-
-
Save tostercx/965b233f09f64f01a16d to your computer and use it in GitHub Desktop.
test.js
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
var net = require('net'); | |
var client = net.connect({host: '10.181.121.21', port: 5552}, | |
function() { | |
console.log('connected to server!'); | |
client.write('TYPE=PARAMGET?Axle Weight Max Permited&'); | |
}); | |
client.on('data', function(data) { | |
console.log(data.toString()); | |
client.end(); | |
}); | |
client.on('end', function() { | |
console.log('disconnected from server'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment