Added example of direct connection

This commit is contained in:
Parnic
2018-03-31 11:24:47 -05:00
parent 7907430e95
commit a25b0ff3b2

View File

@ -2,7 +2,14 @@ const ScreenLogic = require('./index');
var finder = new ScreenLogic.FindUnits();
finder.on('serverFound', function(server) {
var client = new ScreenLogic.UnitConnection(server);
connect(new ScreenLogic.UnitConnection(server));
});
finder.search();
//connect(new ScreenLogic.UnitConnection(80, '10.0.0.85'));
function connect(client) {
client.on('loggedIn', function() {
this.getVersion();
this.getPoolStatus();
@ -32,6 +39,4 @@ finder.on('serverFound', function(server) {
});
client.connect();
});
finder.search();
}