citronneur / node-rdpjs

Remote Desktop Protocol for Node.js
GNU General Public License v3.0
887 stars 154 forks source link

How to handle timeout ? #41

Open MeriemBo opened 5 years ago

MeriemBo commented 5 years ago

I'm using the packge from a nodejs application , and it doesn't connect to the remote deskrop and I get this error in the console :

[node-rdpjs] ERROR:     ETIMEDOUT(connect ETIMEDOUT 106.162.16.143:9602)
Error: connect ETIMEDOUT 106.162.16.143:9602
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1054:14)

here is the config I'm using :

rdp.createClient({ 
domain : '106.162.16.143:9602', 
userName : 'username',
password : 'password',
enablePerf : true,
autoLogin : true,
decompress : false,
screen : { width : 800, height : 600 },
locale : 'en',
logLevel : 'INFO'
}).on('connect', function () {
console.log('connected!!');
}).on('close', function() {
}).on('bitmap', function(bitmap) {
}).on('error', function(err) {
  }).connect('106.162.16.143', 9602);