update Do 30. Apr 12:01:01 CEST 2020
This commit is contained in:
parent
6732c0abc8
commit
dd2dc48407
@ -10,12 +10,19 @@ module.exports = function (io, sql, tw, async, app_cfg) {
|
|||||||
if (socket_rooms) {
|
if (socket_rooms) {
|
||||||
socket_rooms.forEach(function (rooms) {
|
socket_rooms.forEach(function (rooms) {
|
||||||
// fuer jede Wache(rooms.room) die verbundenen Sockets(Clients) ermitteln und den Einsatz verteilen
|
// fuer jede Wache(rooms.room) die verbundenen Sockets(Clients) ermitteln und den Einsatz verteilen
|
||||||
var room_sockets = io.nsps['/waip'].adapter.rooms[rooms.room].sockets;
|
|
||||||
|
var room_sockets = io.nsps['/waip'].adapter.rooms[rooms.room];//.sockets;
|
||||||
console.log(room_sockets);
|
console.log(room_sockets);
|
||||||
if (typeof room_sockets !== 'undefined') {
|
if (typeof room_sockets !== 'undefined'){ // ) {
|
||||||
Object.keys(room_sockets).forEach(function (socket) {
|
Object.keys(room_sockets.sockets).forEach(function (socket) {
|
||||||
waip_verteilen(waip_id, socket, rooms.room);
|
console.log(socket);
|
||||||
sql.db_log('WAIP', 'Einsatz ' + waip_id + ' wird an ' + socket.id + ' (' + rooms.room + ') gesendet');
|
if (typeof socket !== 'undefined') {
|
||||||
|
|
||||||
|
var socket_real = io.of('/waip').connected[socket];
|
||||||
|
console.log(socket_real);
|
||||||
|
waip_verteilen(waip_id, socket_real, rooms.room);
|
||||||
|
sql.db_log('WAIP', 'Einsatz ' + waip_id + ' wird an ' + socket.id + ' (' + rooms.room + ') gesendet');
|
||||||
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user