/* jshint node:true */
/**
 * PUSH Notification server
 * (c) Telefonica Digital, 2012 - All rights reserved
 * License: GNU Affero V3 (see LICENSE file)
 * Fernando Rodríguez Sela <frsela@tid.es>
 * Guillermo Lopez Leal <gll@tid.es>
 */

'use strict';


function ConnectorWebSocket(data, connection) {
    this.data = data;
    this.connection = connection;
}

ConnectorWebSocket.prototype = {
    getType: function() {
        return 'WS';
    },

    getServer: function() {
        return process.serverId;
    },

    getConnection: function() {
        return this.connection;
    },

    getInterface: function() {
        return null;
    },

    getMobileNetwork: function() {
        return null;
    },

    getProtocol: function() {
        return 'ws';
    },

    canBeWakeup: function() {
        return false;
    },

    resetAutoclose: function() {
        // nothing to do on this connector
    },

    notify: function(msgList) {
        this.connection.sendUTF(JSON.stringify(msgList));
    }
};

module.exports = ConnectorWebSocket;
/* jshint node:true */
/**
 * PUSH Notification server
 * (c) Telefonica Digital, 2012 - All rights reserved
 * License: GNU Affero V3 (see LICENSE file)
 * Fernando Rodríguez Sela <frsela@tid.es>
 * Guillermo Lopez Leal <gll@tid.es>
 */

'use strict';


function ConnectorWebSocket(data, connection) {
    this.data = data;
    this.connection = connection;
}

ConnectorWebSocket.prototype = {
    getType: function() {
        return 'WS';
    },

    getServer: function() {
        return process.serverId;
    },

    getConnection: function() {
        return this.connection;
    },

    getInterface: function() {
        return null;
    },

    getMobileNetwork: function() {
        return this.data.mobilenetwork || null;
    },

    getProtocol: function() {
        return 'ws';
    },

    canBeWakeup: function() {
        return false;
    },

    resetAutoclose: function() {
        // nothing to do on this connector
    },

    notify: function(msgList) {
        this.connection.sendUTF(JSON.stringify(msgList));
    }
};

module.exports = ConnectorWebSocket;
Save mcc-mnc data to WS connector, so monitor is able to print logs for Deployment KPIs
Save mcc-mnc data to WS connector, so monitor is able to print logs for Deployment KPIs
