1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

Reverse port forwarding works, but changes don't apply to new devices yet.

This commit is contained in:
Simo Kinnunen 2014-04-15 15:52:00 +09:00
parent a1fa91a356
commit f8a2eeab26
6 changed files with 97 additions and 33 deletions

View file

@ -1,6 +1,6 @@
var io = require('socket.io')
module.exports = function SocketFactory() {
module.exports = function SocketFactory($rootScope) {
var socket = io.connect(null, {
reconnect: false
})
@ -26,5 +26,11 @@ module.exports = function SocketFactory() {
}
}
socket.on('socket.ip', function(ip) {
$rootScope.$apply(function() {
socket.ip = ip
})
})
return socket
}