server/lib/_TcpClient.js
function TcpClient (socket) {
    this.debug     = socket.controller.debug; // inherit controller debug level
    this.gateway   = socket.controller.gateway;
    this.controller= socket.controller;
    this.adapter   = socket.adapter;
    this.socket    = socket;
    this.devid     = false;    // devid/mmsi directly from device or adapter
    this.name      = false;
    this.logged    = false;
    this.alarmcount= 0;        // count alarm messages
    this.errorcount= 0;        // number of ignore messages
    this.jobcount  = 0;        // Job commands send to gateway
    this.count     = 0;        // generic counter used by file backend
    
    if (socket.remoteAddress !== undefined) {
       this.uid= "tcpclient//"  + this.adapter.info + "/remote:" + socket.remoteAddress +":" + socket.remotePort;
    } else {
       this.uid= "tcpclient://" + this.adapter.info + ":" + socket.port;
    }
}
function TcpClient (socket) {
    this.debug     = socket.controller.debug; // inherit controller debug level
    this.gateway   = socket.controller.gateway;
    this.controller= socket.controller;
    this.adapter   = socket.adapter;
    this.socket    = socket;
    this.devid     = false;    // devid/mmsi directly from device or adapter
    this.name      = false;
    this.logged    = false;
    this.alarmcount= 0;        // count alarm messages
    this.errorcount= 0;        // number of ignore messages
    this.jobcount  = 0;        // Job commands send to gateway
    this.count     = 0;        // generic counter used by file backend
    
    if (socket.remoteAddress !== undefined) {
       this.uid= "tcpclient//"  + this.adapter.info + "/remote:" + socket.remoteAddress +":" + socket.remotePort;
    } else {
       this.uid= "tcpclient://" + this.adapter.info + ":" + socket.port;
    }
}
function TcpClient ( socket ) { this . debug = socket . controller . debug ; // inherit controller debug level this . gateway = socket . controller . gateway ; this . controller = socket . controller ; this . adapter = socket . adapter ; this . socket = socket ; this . devid = false ; // devid/mmsi directly from device or adapter this . name = false ; this . logged = false ; this . alarmcount = 0 ; // count alarm messages this . errorcount = 0 ; // number of ignore messages this . jobcount = 0 ; // Job commands send to gateway this . count = 0 ; // generic counter used by file backend if ( socket . remoteAddress !== undefined ) { this . uid = "tcpclient//" + this . adapter . info + "/remote:" + socket . remoteAddress + ":" + socket . remotePort ; } else { this . uid = "tcpclient://" + this . adapter . info + ":" + socket . port ; } }
called from TcpFeed class of adapter
called from TcpFeed class of adapter