es6 updates
This commit is contained in:
parent
e79e8064f4
commit
a5bf16503c
18 changed files with 1401 additions and 1216 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
const net = require('net'),
|
||||
tls = require('tls'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
EventParser = new require('../entities/EventParser.js'),
|
||||
Message = require('js-message'),
|
||||
fs = require('fs'),
|
||||
Queue = require('js-queue');
|
||||
|
@ -14,7 +14,7 @@ if(process.version[1]>4){
|
|||
|
||||
class Client extends Events{
|
||||
constructor(config,log){
|
||||
super();
|
||||
super(config);
|
||||
Object.assign(
|
||||
this,
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ function emit(type,data){
|
|||
if(this.config.rawBuffer){
|
||||
message=new Buffer(type,this.config.encoding);
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
message=client.format(message);
|
||||
}
|
||||
|
||||
if(!this.config.sync){
|
||||
|
@ -221,14 +221,14 @@ function connect(){
|
|||
|
||||
data=(this.ipcBuffer+=data);
|
||||
|
||||
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
|
||||
if(data.slice(-1)!=client.delimiter || data.indexOf(client.delimiter) == -1){
|
||||
client.log('Messages are large, You may want to consider smaller messages.');
|
||||
return;
|
||||
}
|
||||
|
||||
this.ipcBuffer='';
|
||||
|
||||
const events = eventParser.parse(data);
|
||||
const events = client.parse(data);
|
||||
const eCount = events.length;
|
||||
for(let i=0; i<eCount; i++){
|
||||
let message=new Message;
|
||||
|
|
|
@ -4,7 +4,7 @@ const net = require('net'),
|
|||
tls = require('tls'),
|
||||
fs = require('fs'),
|
||||
dgram = require('dgram'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
EventParser = require('../entities/EventParser.js'),
|
||||
Message = require('js-message');
|
||||
|
||||
let Events = require('event-pubsub/es5');
|
||||
|
@ -14,7 +14,7 @@ if(process.version[1]>4){
|
|||
|
||||
class Server extends Events{
|
||||
constructor(path,config,log,port){
|
||||
super();
|
||||
super(config);
|
||||
Object.assign(
|
||||
this,
|
||||
{
|
||||
|
|
|
@ -29,6 +29,8 @@ class Defaults{
|
|||
this.rawBuffer=false;
|
||||
this.sync=false;
|
||||
|
||||
this.delimiter='\f';
|
||||
|
||||
this.silent=false;
|
||||
this.logDepth=5;
|
||||
this.logInColor=true;
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
const parser={
|
||||
class Parser{
|
||||
constructor(config){
|
||||
Object.assign(
|
||||
this,
|
||||
{
|
||||
parse : parseDataEvents,
|
||||
format : formatData,
|
||||
delimiter : '\f'
|
||||
};
|
||||
delimiter : config.delimiter||'\f'
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function formatData(message){
|
||||
formatData(message){
|
||||
if(!message.data && message.data!==false && message.data!==0){
|
||||
message.data={};
|
||||
}
|
||||
|
@ -16,12 +22,13 @@ function formatData(message){
|
|||
|
||||
message=message.JSON+parser.delimiter;
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
function parseDataEvents(data){
|
||||
parseDataEvents(data){
|
||||
let events=data.split(parser.delimiter);
|
||||
events.pop();
|
||||
return events;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports=parser;
|
||||
module.exports=Parser;
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"colors": "*",
|
||||
"event-pubsub": "4.2.3",
|
||||
"event-pubsub": "4.2.4",
|
||||
"js-message": ">=1.0.5",
|
||||
"js-queue": ">=2.0.0"
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">68.9% </span>
|
||||
<span class="strong">28.7% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>308/447</span>
|
||||
<span class='fraction'>128/446</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">56.28% </span>
|
||||
<span class="strong">12.88% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>130/231</span>
|
||||
<span class='fraction'>30/233</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">85.37% </span>
|
||||
<span class="strong">33.33% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>35/41</span>
|
||||
<span class='fraction'>14/42</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">68.9% </span>
|
||||
<span class="strong">28.7% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>308/447</span>
|
||||
<span class='fraction'>128/446</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
|
@ -72,42 +72,42 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/dao/"><a href="node-ipc/dao/index.html">node-ipc/dao/</a></td>
|
||||
<td data-value="67.38" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 67%;"></div><div class="cover-empty" style="width:33%;"></div></div></td>
|
||||
<td data-value="67.38" class="pct medium">67.38%</td>
|
||||
<td data-value="282" class="abs medium">190/282</td>
|
||||
<td data-value="54" class="pct medium">54%</td>
|
||||
<td data-value="150" class="abs medium">81/150</td>
|
||||
<td data-value="83.33" class="pct high">83.33%</td>
|
||||
<td data-value="30" class="abs high">25/30</td>
|
||||
<td data-value="67.38" class="pct medium">67.38%</td>
|
||||
<td data-value="282" class="abs medium">190/282</td>
|
||||
<td class="file low" data-value="node-ipc/dao/"><a href="node-ipc/dao/index.html">node-ipc/dao/</a></td>
|
||||
<td data-value="21.93" class="pic low"><div class="chart"><div class="cover-fill" style="width: 21%;"></div><div class="cover-empty" style="width:79%;"></div></div></td>
|
||||
<td data-value="21.93" class="pct low">21.93%</td>
|
||||
<td data-value="269" class="abs low">59/269</td>
|
||||
<td data-value="9.09" class="pct low">9.09%</td>
|
||||
<td data-value="143" class="abs low">13/143</td>
|
||||
<td data-value="25" class="pct low">25%</td>
|
||||
<td data-value="28" class="abs low">7/28</td>
|
||||
<td data-value="21.93" class="pct low">21.93%</td>
|
||||
<td data-value="269" class="abs low">59/269</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
|
||||
<td data-value="96.15" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
|
||||
<td data-value="96.15" class="pct high">96.15%</td>
|
||||
<td data-value="26" class="abs high">25/26</td>
|
||||
<td data-value="57.14" class="pct medium">57.14%</td>
|
||||
<td data-value="7" class="abs medium">4/7</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="96.15" class="pct high">96.15%</td>
|
||||
<td data-value="26" class="abs high">25/26</td>
|
||||
<td class="file medium" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
|
||||
<td data-value="71.05" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 71%;"></div><div class="cover-empty" style="width:29%;"></div></div></td>
|
||||
<td data-value="71.05" class="pct medium">71.05%</td>
|
||||
<td data-value="38" class="abs medium">27/38</td>
|
||||
<td data-value="25" class="pct low">25%</td>
|
||||
<td data-value="16" class="abs low">4/16</td>
|
||||
<td data-value="40" class="pct low">40%</td>
|
||||
<td data-value="5" class="abs low">2/5</td>
|
||||
<td data-value="71.05" class="pct medium">71.05%</td>
|
||||
<td data-value="38" class="abs medium">27/38</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/services/"><a href="node-ipc/services/index.html">node-ipc/services/</a></td>
|
||||
<td data-value="65.93" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 65%;"></div><div class="cover-empty" style="width:35%;"></div></div></td>
|
||||
<td data-value="65.93" class="pct medium">65.93%</td>
|
||||
<td data-value="135" class="abs medium">89/135</td>
|
||||
<td data-value="60.81" class="pct medium">60.81%</td>
|
||||
<td data-value="74" class="abs medium">45/74</td>
|
||||
<td data-value="87.5" class="pct high">87.5%</td>
|
||||
<td data-value="8" class="abs high">7/8</td>
|
||||
<td data-value="65.93" class="pct medium">65.93%</td>
|
||||
<td data-value="135" class="abs medium">89/135</td>
|
||||
<td class="file low" data-value="node-ipc/services/"><a href="node-ipc/services/index.html">node-ipc/services/</a></td>
|
||||
<td data-value="28.15" class="pic low"><div class="chart"><div class="cover-fill" style="width: 28%;"></div><div class="cover-empty" style="width:72%;"></div></div></td>
|
||||
<td data-value="28.15" class="pct low">28.15%</td>
|
||||
<td data-value="135" class="abs low">38/135</td>
|
||||
<td data-value="17.57" class="pct low">17.57%</td>
|
||||
<td data-value="74" class="abs low">13/74</td>
|
||||
<td data-value="50" class="pct medium">50%</td>
|
||||
<td data-value="8" class="abs medium">4/8</td>
|
||||
<td data-value="28.15" class="pct low">28.15%</td>
|
||||
<td data-value="135" class="abs low">38/135</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
@ -116,7 +116,7 @@
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
|
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">71.17% </span>
|
||||
<span class="strong">40.54% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>79/111</span>
|
||||
<span class='fraction'>45/111</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">50.94% </span>
|
||||
<span class="strong">22.64% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>27/53</span>
|
||||
<span class='fraction'>12/53</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="strong">77.78% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>9/9</span>
|
||||
<span class='fraction'>7/9</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">71.17% </span>
|
||||
<span class="strong">40.54% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>79/111</span>
|
||||
<span class='fraction'>45/111</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
|
@ -312,8 +312,8 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -331,176 +331,176 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">5×</span>
|
||||
<span class="cline-any cline-yes">5×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-yes">5×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">5×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">10×</span>
|
||||
<span class="cline-any cline-yes">10×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">13×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -513,37 +513,37 @@
|
|||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -553,7 +553,7 @@
|
|||
|
||||
const net = require('net'),
|
||||
tls = require('tls'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
EventParser = new require('../entities/EventParser.js'),
|
||||
Message = require('js-message'),
|
||||
fs = require('fs'),
|
||||
Queue = require('js-queue');
|
||||
|
@ -565,7 +565,7 @@ let Events = require('event-pubsub/es5');
|
|||
|
||||
class Client extends Events{
|
||||
constructor(config,log){
|
||||
super();
|
||||
super(config);
|
||||
Object.assign(
|
||||
this,
|
||||
{
|
||||
|
@ -593,22 +593,22 @@ function emit(type,data){
|
|||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
|
||||
<span class="cstat-no" title="statement not covered" > message=new Buffer(type,this.config.encoding);</span>
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
message=client.format(message);
|
||||
}
|
||||
|
||||
if(!this.config.sync){
|
||||
this.socket.write(message);
|
||||
return;
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.config.sync){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.socket.write(message);</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.queue.add(
|
||||
<span class="cstat-no" title="statement not covered" > this.queue.add(</span>
|
||||
syncEmit.bind(this,message)
|
||||
);
|
||||
}
|
||||
|
||||
function syncEmit(message){
|
||||
this.log('dispatching event to ', this.id, this.path, ' : ', message);
|
||||
this.socket.write(message);
|
||||
<span class="fstat-no" title="function not covered" >function syncEmit(message){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('dispatching event to ', this.id, this.path, ' : ', message);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.socket.write(message);</span>
|
||||
}
|
||||
|
||||
function connect(){
|
||||
|
@ -623,7 +623,7 @@ function connect(){
|
|||
|
||||
const options={};
|
||||
|
||||
if(!client.port){
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!client.port){
|
||||
client.log('Connecting client on Unix Socket :', client.path);
|
||||
|
||||
options.path=client.path;
|
||||
|
@ -636,32 +636,32 @@ function connect(){
|
|||
|
||||
client.socket = net.connect(options);
|
||||
}else{
|
||||
options.host=client.path;
|
||||
options.port=client.port;
|
||||
<span class="cstat-no" title="statement not covered" > options.host=client.path;</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.port=client.port;</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.localAddress){
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.interface.localAddress){</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localAddress=client.config.interface.localAddress;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.localPort){
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.interface.localPort){</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localPort=client.config.interface.localPort;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.family){
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.interface.family){</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.family=client.config.interface.family;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.hints){
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.interface.hints){</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.hints=client.config.interface.hints;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.interface.lookup){
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.interface.lookup){</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.lookup=client.config.interface.lookup;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!client.config.tls){
|
||||
client.log('Connecting client via TCP to', options);
|
||||
client.socket = net.connect(options);
|
||||
<span class="cstat-no" title="statement not covered" > if(!client.config.tls){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('Connecting client via TCP to', options);</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.socket = net.connect(options);</span>
|
||||
}else{
|
||||
<span class="cstat-no" title="statement not covered" > client.log('Connecting client via TLS to', client.path ,client.port,client.config.tls);</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.tls.private){</span>
|
||||
|
@ -705,8 +705,8 @@ function connect(){
|
|||
'connect',
|
||||
function connectionMade(){
|
||||
client.publish('connect');
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
client.log('retrying reset');
|
||||
<span class="cstat-no" title="statement not covered" > client.retriesRemaining=client.config.maxRetries;</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('retrying reset');</span>
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -751,9 +751,9 @@ function connect(){
|
|||
|
||||
client.socket.on(
|
||||
'data',
|
||||
function(data) {
|
||||
client.log('## received events ##');
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(client.config.rawBuffer){
|
||||
<span class="fstat-no" title="function not covered" > function(data) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('## received events ##');</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.rawBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.publish(</span>
|
||||
'data',
|
||||
new Buffer(data,client.config.encoding)
|
||||
|
@ -766,37 +766,37 @@ function connect(){
|
|||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.ipcBuffer){
|
||||
this.ipcBuffer='';
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.ipcBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
|
||||
}
|
||||
|
||||
data=(this.ipcBuffer+=data);
|
||||
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
|
||||
<span class="cstat-no" title="statement not covered" > if(data.slice(-1)!=client.delimiter || data.indexOf(client.delimiter) == -1){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('Messages are large, You may want to consider smaller messages.');</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.ipcBuffer='';
|
||||
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
|
||||
|
||||
const events = eventParser.parse(data);
|
||||
const eCount = events.length;
|
||||
for(let i=0; i<eCount; i++){
|
||||
let message=new Message;
|
||||
message.load(events[i]);
|
||||
<span class="cstat-no" title="statement not covered" > const events = client.parse(data);</span>
|
||||
<span class="cstat-no" title="statement not covered" > const eCount = events.length;</span>
|
||||
<span class="cstat-no" title="statement not covered" > for(let i=0; i<eCount; i++){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.load(events[i]);</span>
|
||||
|
||||
client.log('detected event', message.type, message.data);
|
||||
client.publish(
|
||||
<span class="cstat-no" title="statement not covered" > client.log('detected event', message.type, message.data);</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.publish(</span>
|
||||
message.type,
|
||||
message.data
|
||||
);
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!client.config.sync){
|
||||
<span class="cstat-no" title="statement not covered" > if(!client.config.sync){</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
client.queue.next();
|
||||
<span class="cstat-no" title="statement not covered" > client.queue.next();</span>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -808,7 +808,7 @@ module.exports=Client;
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">67.38% </span>
|
||||
<span class="strong">21.93% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>190/282</span>
|
||||
<span class='fraction'>59/269</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">54% </span>
|
||||
<span class="strong">9.09% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>81/150</span>
|
||||
<span class='fraction'>13/143</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">83.33% </span>
|
||||
<span class="strong">25% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>25/30</span>
|
||||
<span class='fraction'>7/28</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">67.38% </span>
|
||||
<span class="strong">21.93% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>190/282</span>
|
||||
<span class='fraction'>59/269</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
|
@ -59,42 +59,29 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="client.js"><a href="client.js.html">client.js</a></td>
|
||||
<td data-value="71.17" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 71%;"></div><div class="cover-empty" style="width:29%;"></div></div></td>
|
||||
<td data-value="71.17" class="pct medium">71.17%</td>
|
||||
<td data-value="111" class="abs medium">79/111</td>
|
||||
<td data-value="50.94" class="pct medium">50.94%</td>
|
||||
<td data-value="53" class="abs medium">27/53</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="9" class="abs high">9/9</td>
|
||||
<td data-value="71.17" class="pct medium">71.17%</td>
|
||||
<td data-value="111" class="abs medium">79/111</td>
|
||||
<td class="file low" data-value="client.js"><a href="client.js.html">client.js</a></td>
|
||||
<td data-value="40.54" class="pic low"><div class="chart"><div class="cover-fill" style="width: 40%;"></div><div class="cover-empty" style="width:60%;"></div></div></td>
|
||||
<td data-value="40.54" class="pct low">40.54%</td>
|
||||
<td data-value="111" class="abs low">45/111</td>
|
||||
<td data-value="22.64" class="pct low">22.64%</td>
|
||||
<td data-value="53" class="abs low">12/53</td>
|
||||
<td data-value="77.78" class="pct medium">77.78%</td>
|
||||
<td data-value="9" class="abs medium">7/9</td>
|
||||
<td data-value="40.54" class="pct low">40.54%</td>
|
||||
<td data-value="111" class="abs low">45/111</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="eventParser.js"><a href="eventParser.js.html">eventParser.js</a></td>
|
||||
<td data-value="84.62" class="pic high"><div class="chart"><div class="cover-fill" style="width: 84%;"></div><div class="cover-empty" style="width:16%;"></div></div></td>
|
||||
<td data-value="84.62" class="pct high">84.62%</td>
|
||||
<td data-value="13" class="abs high">11/13</td>
|
||||
<td data-value="42.86" class="pct low">42.86%</td>
|
||||
<td data-value="7" class="abs low">3/7</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="84.62" class="pct high">84.62%</td>
|
||||
<td data-value="13" class="abs high">11/13</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
|
||||
<td data-value="63.29" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 63%;"></div><div class="cover-empty" style="width:37%;"></div></div></td>
|
||||
<td data-value="63.29" class="pct medium">63.29%</td>
|
||||
<td data-value="158" class="abs medium">100/158</td>
|
||||
<td data-value="56.67" class="pct medium">56.67%</td>
|
||||
<td data-value="90" class="abs medium">51/90</td>
|
||||
<td data-value="73.68" class="pct medium">73.68%</td>
|
||||
<td data-value="19" class="abs medium">14/19</td>
|
||||
<td data-value="63.29" class="pct medium">63.29%</td>
|
||||
<td data-value="158" class="abs medium">100/158</td>
|
||||
<td class="file low" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
|
||||
<td data-value="8.86" class="pic low"><div class="chart"><div class="cover-fill" style="width: 8%;"></div><div class="cover-empty" style="width:92%;"></div></div></td>
|
||||
<td data-value="8.86" class="pct low">8.86%</td>
|
||||
<td data-value="158" class="abs low">14/158</td>
|
||||
<td data-value="1.11" class="pct low">1.11%</td>
|
||||
<td data-value="90" class="abs low">1/90</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="19" class="abs low">0/19</td>
|
||||
<td data-value="8.86" class="pct low">8.86%</td>
|
||||
<td data-value="158" class="abs low">14/158</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
@ -103,7 +90,7 @@
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">63.29% </span>
|
||||
<span class="strong">8.86% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>100/158</span>
|
||||
<span class='fraction'>14/158</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">56.67% </span>
|
||||
<span class="strong">1.11% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>51/90</span>
|
||||
<span class='fraction'>1/90</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">73.68% </span>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>14/19</span>
|
||||
<span class='fraction'>0/19</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">63.29% </span>
|
||||
<span class="strong">8.86% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>100/158</span>
|
||||
<span class='fraction'>14/158</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
|
@ -453,47 +453,47 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -501,32 +501,32 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
|
@ -556,37 +556,37 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -596,33 +596,33 @@
|
|||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -631,26 +631,26 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
|
@ -659,69 +659,69 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
|
@ -733,42 +733,42 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -809,15 +809,15 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -837,7 +837,7 @@ const net = require('net'),
|
|||
tls = require('tls'),
|
||||
fs = require('fs'),
|
||||
dgram = require('dgram'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
EventParser = require('../entities/EventParser.js'),
|
||||
Message = require('js-message');
|
||||
|
||||
let Events = require('event-pubsub/es5');
|
||||
|
@ -846,9 +846,9 @@ let Events = require('event-pubsub/es5');
|
|||
}
|
||||
|
||||
class Server extends Events{
|
||||
constructor(path,config,log,port){
|
||||
super();
|
||||
Object.assign(
|
||||
constructor<span class="fstat-no" title="function not covered" >(path,config,log,port){</span>
|
||||
<span class="cstat-no" title="statement not covered" > super(config);</span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.assign(</span>
|
||||
this,
|
||||
{
|
||||
config : config,
|
||||
|
@ -864,63 +864,63 @@ class Server extends Events{
|
|||
}
|
||||
);
|
||||
|
||||
this.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.on(</span>
|
||||
'close',
|
||||
serverClosed.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
onStart(socket){
|
||||
this.trigger(
|
||||
onStart<span class="fstat-no" title="function not covered" >(socket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.trigger(</span>
|
||||
'start',
|
||||
socket
|
||||
);
|
||||
}
|
||||
|
||||
stop(){
|
||||
this.server.close();
|
||||
stop<span class="fstat-no" title="function not covered" >(){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server.close();</span>
|
||||
}
|
||||
|
||||
start(){
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!this.path){
|
||||
start<span class="fstat-no" title="function not covered" >(){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.path){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('Socket Server Path not specified, refusing to start');</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
fs.unlink(
|
||||
<span class="cstat-no" title="statement not covered" > fs.unlink(</span>
|
||||
this.path,
|
||||
startServer.bind(this)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function emit(socket, type, data){
|
||||
this.log('dispatching event to socket', ' : ', type, data);
|
||||
<span class="fstat-no" title="function not covered" >function emit(socket, type, data){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('dispatching event to socket', ' : ', type, data);</span>
|
||||
|
||||
let message=new Message;
|
||||
message.type=type;
|
||||
message.data=data;
|
||||
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.type=type;</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.data=data;</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
|
||||
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(this.config.encoding)</span>
|
||||
<span class="cstat-no" title="statement not covered" > message=new Buffer(type,this.config.encoding);</span>
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
<span class="cstat-no" title="statement not covered" > message=eventParser.format(message);</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(this.udp4 || this.udp6){
|
||||
<span class="cstat-no" title="statement not covered" > if(this.udp4 || this.udp6){</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!socket.address || !socket.port){
|
||||
<span class="cstat-no" title="statement not covered" > if(!socket.address || !socket.port){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('Attempting to emit to a single UDP socket without supplying socket address or port. Redispatching event as broadcast to all connected sockets');</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.broadcast(type,data);</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.server.write(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.write(</span>
|
||||
message,
|
||||
socket
|
||||
);
|
||||
return;
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
<span class="cstat-no" title="statement not covered" > socket.write(message);</span>
|
||||
|
@ -949,38 +949,38 @@ function emit(socket, type, data){
|
|||
}
|
||||
}
|
||||
|
||||
function serverClosed(){
|
||||
for(let i=0, count=this.sockets.length; i<count; i++){
|
||||
let socket=this.sockets[i];
|
||||
let destroyedSocketId=false;
|
||||
<span class="fstat-no" title="function not covered" >function serverClosed(){</span>
|
||||
<span class="cstat-no" title="statement not covered" > for(let i=0, count=this.sockets.length; i<count; i++){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let socket=this.sockets[i];</span>
|
||||
<span class="cstat-no" title="statement not covered" > let destroyedSocketId=false;</span>
|
||||
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(socket){
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket.readable){
|
||||
<span class="cstat-no" title="statement not covered" > if(socket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(socket.readable){</span>
|
||||
<span class="cstat-no" title="statement not covered" > continue;</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket.id){
|
||||
<span class="cstat-no" title="statement not covered" > if(socket.id){</span>
|
||||
<span class="cstat-no" title="statement not covered" > destroyedSocketId=socket.id;</span>
|
||||
}
|
||||
|
||||
this.log('socket disconnected',destroyedSocketId.toString());
|
||||
<span class="cstat-no" title="statement not covered" > this.log('socket disconnected',destroyedSocketId.toString());</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket && socket.destroy){
|
||||
<span class="cstat-no" title="statement not covered" > if(socket && socket.destroy){</span>
|
||||
<span class="cstat-no" title="statement not covered" > socket.destroy();</span>
|
||||
}
|
||||
|
||||
this.sockets.splice(i,1);
|
||||
<span class="cstat-no" title="statement not covered" > this.sockets.splice(i,1);</span>
|
||||
|
||||
this.publish('socket.disconnected', socket, destroyedSocketId);
|
||||
<span class="cstat-no" title="statement not covered" > this.publish('socket.disconnected', socket, destroyedSocketId);</span>
|
||||
|
||||
return;
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
}
|
||||
|
||||
function gotData(socket,data,UDPSocket){
|
||||
let sock=((this.udp4 || this.udp6)? UDPSocket : <span class="branch-1 cbranch-no" title="branch not covered" >socket)</span>;
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
|
||||
<span class="fstat-no" title="function not covered" >function gotData(socket,data,UDPSocket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let sock=((this.udp4 || this.udp6)? UDPSocket : socket);</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > data=new Buffer(data,this.config.encoding);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.publish(</span>
|
||||
'data',
|
||||
|
@ -990,33 +990,33 @@ function gotData(socket,data,UDPSocket){
|
|||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.ipcBuffer){
|
||||
this.ipcBuffer='';
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.ipcBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
|
||||
}
|
||||
|
||||
data=(this.ipcBuffer+=data);
|
||||
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
|
||||
<span class="cstat-no" title="statement not covered" > if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('Messages are large, You may want to consider smaller messages.');</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.ipcBuffer='';
|
||||
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
|
||||
|
||||
data=eventParser.parse(data);
|
||||
<span class="cstat-no" title="statement not covered" > data=eventParser.parse(data);</span>
|
||||
|
||||
while(data.length>0){
|
||||
let message=new Message;
|
||||
message.load(data.shift());
|
||||
<span class="cstat-no" title="statement not covered" > while(data.length>0){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let message=new Message;</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.load(data.shift());</span>
|
||||
|
||||
// Only set the sock id if it is specified.
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if (message.data && message.data.id){
|
||||
sock.id=message.data.id;
|
||||
<span class="cstat-no" title="statement not covered" > if (message.data && message.data.id){</span>
|
||||
<span class="cstat-no" title="statement not covered" > sock.id=message.data.id;</span>
|
||||
}
|
||||
|
||||
this.log('received event of : ',message.type,message.data);
|
||||
<span class="cstat-no" title="statement not covered" > this.log('received event of : ',message.type,message.data);</span>
|
||||
|
||||
this.publish(
|
||||
<span class="cstat-no" title="statement not covered" > this.publish(</span>
|
||||
message.type,
|
||||
message.data,
|
||||
sock
|
||||
|
@ -1024,27 +1024,27 @@ function gotData(socket,data,UDPSocket){
|
|||
}
|
||||
}
|
||||
|
||||
function socketClosed(socket){
|
||||
this.publish(
|
||||
<span class="fstat-no" title="function not covered" >function socketClosed(socket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.publish(</span>
|
||||
'close',
|
||||
socket
|
||||
);
|
||||
}
|
||||
|
||||
function serverCreated(socket) {
|
||||
this.sockets.push(socket);
|
||||
<span class="fstat-no" title="function not covered" >function serverCreated(socket) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.sockets.push(socket);</span>
|
||||
|
||||
if(socket.setEncoding){
|
||||
socket.setEncoding(this.config.encoding);
|
||||
<span class="cstat-no" title="statement not covered" > if(socket.setEncoding){</span>
|
||||
<span class="cstat-no" title="statement not covered" > socket.setEncoding(this.config.encoding);</span>
|
||||
}
|
||||
|
||||
this.log('## socket connection to server detected ##');
|
||||
socket.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.log('## socket connection to server detected ##');</span>
|
||||
<span class="cstat-no" title="statement not covered" > socket.on(</span>
|
||||
'close',
|
||||
socketClosed.bind(this)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
<span class="cstat-no" title="statement not covered" > socket.on(</span>
|
||||
'error',
|
||||
<span class="fstat-no" title="function not covered" > function(err){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('server socket error',err);</span>
|
||||
|
@ -1053,69 +1053,69 @@ function serverCreated(socket) {
|
|||
}.bind(this)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
<span class="cstat-no" title="statement not covered" > socket.on(</span>
|
||||
'data',
|
||||
gotData.bind(this,socket)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
<span class="cstat-no" title="statement not covered" > socket.on(</span>
|
||||
'message',
|
||||
function(msg,rinfo) {
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if (!rinfo){
|
||||
<span class="fstat-no" title="function not covered" > function(msg,rinfo) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > if (!rinfo){</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.log('Received UDP message from ', rinfo.address, rinfo.port);
|
||||
let data;
|
||||
<span class="cstat-no" title="statement not covered" > this.log('Received UDP message from ', rinfo.address, rinfo.port);</span>
|
||||
<span class="cstat-no" title="statement not covered" > let data;</span>
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawSocket){
|
||||
<span class="cstat-no" title="statement not covered" > if(this.config.rawSocket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > data=new Buffer(msg,this.config.encoding);</span>
|
||||
}else{
|
||||
data=msg.toString();
|
||||
<span class="cstat-no" title="statement not covered" > data=msg.toString();</span>
|
||||
}
|
||||
socket.emit('data',data,rinfo);
|
||||
<span class="cstat-no" title="statement not covered" > socket.emit('data',data,rinfo);</span>
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
this.publish(
|
||||
<span class="cstat-no" title="statement not covered" > this.publish(</span>
|
||||
'connect',
|
||||
socket
|
||||
);
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
|
||||
<span class="cstat-no" title="statement not covered" > if(this.config.rawBuffer){</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
}
|
||||
|
||||
function startServer() {
|
||||
this.log(
|
||||
<span class="fstat-no" title="function not covered" >function startServer() {</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'starting server on ',this.path,
|
||||
((this.port)?`:${this.port}`:'')
|
||||
);
|
||||
|
||||
if(!this.udp4 && !this.udp6){
|
||||
this.log('starting TLS server',this.config.tls);
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.config.tls){
|
||||
this.server=net.createServer(
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.udp4 && !this.udp6){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('starting TLS server',this.config.tls);</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.config.tls){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server=net.createServer(</span>
|
||||
serverCreated.bind(this)
|
||||
);
|
||||
}else{
|
||||
<span class="cstat-no" title="statement not covered" > startTLSServer.bind(this)();</span>
|
||||
}
|
||||
}else{
|
||||
this.server=dgram.createSocket(
|
||||
<span class="cstat-no" title="statement not covered" > this.server=dgram.createSocket(</span>
|
||||
((this.udp4)? 'udp4':'udp6')
|
||||
);
|
||||
this.server.write=UDPWrite.bind(this);
|
||||
this.server.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.write=UDPWrite.bind(this);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
|
||||
'listening',
|
||||
function UDPServerStarted() {
|
||||
serverCreated.bind(this)(this.server);
|
||||
<span class="fstat-no" title="function not covered" > function UDPServerStarted() {</span>
|
||||
<span class="cstat-no" title="statement not covered" > serverCreated.bind(this)(this.server);</span>
|
||||
}.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
this.server.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
|
||||
'error',
|
||||
<span class="fstat-no" title="function not covered" > function(err){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('server error',err);</span>
|
||||
|
@ -1127,42 +1127,42 @@ function startServer() {
|
|||
}
|
||||
);
|
||||
|
||||
this.server.maxConnections=this.config.maxConnections;
|
||||
<span class="cstat-no" title="statement not covered" > this.server.maxConnections=this.config.maxConnections;</span>
|
||||
|
||||
if(!this.port){
|
||||
this.log('starting server as', 'Unix || Windows Socket');
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if (process.platform ==='win32'){
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.port){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('starting server as', 'Unix || Windows Socket');</span>
|
||||
<span class="cstat-no" title="statement not covered" > if (process.platform ==='win32'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.path = this.path.replace(/^\//, '');</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.path = this.path.replace(/\//g, '-');</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.path= `\\\\.\\pipe\\${this.path}`;</span>
|
||||
}
|
||||
|
||||
this.server.listen(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.listen(</span>
|
||||
this.path,
|
||||
this.onStart.bind(this)
|
||||
);
|
||||
|
||||
return;
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
if(!this.udp4 && !this.udp6){
|
||||
this.log('starting server as', (this.config.tls?<span class="branch-0 cbranch-no" title="branch not covered" >'TLS':</span>'TCP'));
|
||||
this.server.listen(
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.udp4 && !this.udp6){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('starting server as', (this.config.tls?'TLS':'TCP'));</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server.listen(</span>
|
||||
this.port,
|
||||
this.path,
|
||||
this.onStart.bind(this)
|
||||
);
|
||||
return;
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
this.log('starting server as',((this.udp4)? 'udp4':'udp6'));
|
||||
<span class="cstat-no" title="statement not covered" > this.log('starting server as',((this.udp4)? 'udp4':'udp6'));</span>
|
||||
|
||||
this.server.bind(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.bind(</span>
|
||||
this.port,
|
||||
this.path
|
||||
);
|
||||
|
||||
this.onStart(
|
||||
<span class="cstat-no" title="statement not covered" > this.onStart(</span>
|
||||
{
|
||||
address : this.path,
|
||||
port : this.port
|
||||
|
@ -1202,16 +1202,16 @@ function startServer() {
|
|||
);
|
||||
}
|
||||
|
||||
function UDPWrite(message,socket){
|
||||
let data=new Buffer(message, this.config.encoding);
|
||||
this.server.send(
|
||||
<span class="fstat-no" title="function not covered" >function UDPWrite(message,socket){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let data=new Buffer(message, this.config.encoding);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server.send(</span>
|
||||
data,
|
||||
0,
|
||||
data.length,
|
||||
socket.port,
|
||||
socket.address,
|
||||
function(err, bytes) {
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(err){
|
||||
<span class="fstat-no" title="function not covered" > function(err, bytes) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(err){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log('error writing data to socket',err);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.publish(</span>
|
||||
'error',
|
||||
|
@ -1231,7 +1231,7 @@ module.exports=Server;
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">96.15% </span>
|
||||
<span class="strong">96.3% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>25/26</span>
|
||||
<span class='fraction'>26/27</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">57.14% </span>
|
||||
|
@ -35,9 +35,9 @@
|
|||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">96.15% </span>
|
||||
<span class="strong">96.3% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>25/26</span>
|
||||
<span class='fraction'>26/27</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -119,7 +119,9 @@
|
|||
74
|
||||
75
|
||||
76
|
||||
77</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||
77
|
||||
78
|
||||
79</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -151,6 +153,8 @@
|
|||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -225,6 +229,8 @@ class Defaults{
|
|||
this.encoding='utf8';
|
||||
this.rawBuffer=false;
|
||||
this.sync=false;
|
||||
|
||||
this.delimiter='\f';
|
||||
|
||||
this.silent=false;
|
||||
this.logDepth=5;
|
||||
|
@ -277,7 +283,7 @@ module.exports=Defaults;
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
167
spec/coverage/lcov-report/node-ipc/entities/EventParser.js.html
Normal file
167
spec/coverage/lcov-report/node-ipc/entities/EventParser.js.html
Normal file
|
@ -0,0 +1,167 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities/EventParser.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../index.html">all files</a> / <a href="index.html">node-ipc/entities/</a> EventParser.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">9.09% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>1/11</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/9</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/3</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">9.09% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>1/11</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
|
||||
|
||||
class Parser{
|
||||
constructor<span class="fstat-no" title="function not covered" >(config){</span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.assign(</span>
|
||||
this,
|
||||
{
|
||||
parse : parseDataEvents,
|
||||
format : formatData,
|
||||
delimiter : config.delimiter||'\f'
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
formatData<span class="fstat-no" title="function not covered" >(message){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!message.data && message.data!==false && message.data!==0){</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.data={};</span>
|
||||
}
|
||||
<span class="cstat-no" title="statement not covered" > if(message.data['_maxListeners']){</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.data={};</span>
|
||||
}
|
||||
|
||||
<span class="cstat-no" title="statement not covered" > message=message.JSON+parser.delimiter;</span>
|
||||
<span class="cstat-no" title="statement not covered" > return message;</span>
|
||||
}
|
||||
|
||||
parseDataEvents<span class="fstat-no" title="function not covered" >(data){</span>
|
||||
<span class="cstat-no" title="statement not covered" > let events=data.split(parser.delimiter);</span>
|
||||
<span class="cstat-no" title="statement not covered" > events.pop();</span>
|
||||
<span class="cstat-no" title="statement not covered" > return events;</span>
|
||||
}
|
||||
}
|
||||
|
||||
module.exports=Parser;
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">96.15% </span>
|
||||
<span class="strong">71.05% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>25/26</span>
|
||||
<span class='fraction'>27/38</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">57.14% </span>
|
||||
<span class="strong">25% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>4/7</span>
|
||||
<span class='fraction'>4/16</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="strong">40% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
<span class='fraction'>2/5</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">96.15% </span>
|
||||
<span class="strong">71.05% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>25/26</span>
|
||||
<span class='fraction'>27/38</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
|
@ -60,15 +60,28 @@
|
|||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="Defaults.js"><a href="Defaults.js.html">Defaults.js</a></td>
|
||||
<td data-value="96.15" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
|
||||
<td data-value="96.15" class="pct high">96.15%</td>
|
||||
<td data-value="26" class="abs high">25/26</td>
|
||||
<td data-value="96.3" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
|
||||
<td data-value="96.3" class="pct high">96.3%</td>
|
||||
<td data-value="27" class="abs high">26/27</td>
|
||||
<td data-value="57.14" class="pct medium">57.14%</td>
|
||||
<td data-value="7" class="abs medium">4/7</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="96.15" class="pct high">96.15%</td>
|
||||
<td data-value="26" class="abs high">25/26</td>
|
||||
<td data-value="96.3" class="pct high">96.3%</td>
|
||||
<td data-value="27" class="abs high">26/27</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file low" data-value="EventParser.js"><a href="EventParser.js.html">EventParser.js</a></td>
|
||||
<td data-value="9.09" class="pic low"><div class="chart"><div class="cover-fill" style="width: 9%;"></div><div class="cover-empty" style="width:91%;"></div></div></td>
|
||||
<td data-value="9.09" class="pct low">9.09%</td>
|
||||
<td data-value="11" class="abs low">1/11</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="9" class="abs low">0/9</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="3" class="abs low">0/3</td>
|
||||
<td data-value="9.09" class="pct low">9.09%</td>
|
||||
<td data-value="11" class="abs low">1/11</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
@ -77,7 +90,7 @@
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
|
|
|
@ -112,7 +112,7 @@ module.exports=new IPCModule;
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
|
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">65.93% </span>
|
||||
<span class="strong">28.15% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>89/135</span>
|
||||
<span class='fraction'>38/135</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">60.81% </span>
|
||||
<span class="strong">17.57% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>45/74</span>
|
||||
<span class='fraction'>13/74</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">87.5% </span>
|
||||
<span class="strong">50% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>7/8</span>
|
||||
<span class='fraction'>4/8</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">65.93% </span>
|
||||
<span class="strong">28.15% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>89/135</span>
|
||||
<span class='fraction'>38/135</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet">1
|
||||
2
|
||||
|
@ -445,18 +445,18 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">116×</span>
|
||||
<span class="cline-any cline-yes">27×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">116×</span>
|
||||
<span class="cline-any cline-yes">27×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">116×</span>
|
||||
<span class="cline-any cline-yes">370×</span>
|
||||
<span class="cline-any cline-yes">336×</span>
|
||||
<span class="cline-any cline-yes">27×</span>
|
||||
<span class="cline-any cline-yes">89×</span>
|
||||
<span class="cline-any cline-yes">83×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">34×</span>
|
||||
<span class="cline-any cline-yes">6×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -465,34 +465,34 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">116×</span>
|
||||
<span class="cline-any cline-yes">27×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">7×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -501,11 +501,17 @@
|
|||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -515,24 +521,100 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
|
@ -542,90 +624,78 @@
|
|||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">2×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
|
@ -638,84 +708,14 @@
|
|||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">4×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">3×</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1×</span>
|
||||
|
@ -825,12 +825,12 @@ function disconnect(id){
|
|||
delete this.of[id];
|
||||
}
|
||||
|
||||
function serve(path,callback){
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof path=='function'){
|
||||
<span class="fstat-no" title="function not covered" >function serve(path,callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof path=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=path;</span>
|
||||
<span class="cstat-no" title="statement not covered" > path=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!path){
|
||||
<span class="cstat-no" title="statement not covered" > if(!path){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Server path not specified, so defaulting to'.notice,
|
||||
'ipc.config.socketRoot + ipc.config.appspace + ipc.config.id'.variable,
|
||||
|
@ -839,17 +839,17 @@ function serve(path,callback){
|
|||
<span class="cstat-no" title="statement not covered" > path=this.config.socketRoot+this.config.appspace+this.config.id;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
|
||||
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
|
||||
}
|
||||
|
||||
this.server=new Server(
|
||||
<span class="cstat-no" title="statement not covered" > this.server=new Server(</span>
|
||||
path,
|
||||
this.config,
|
||||
log
|
||||
);
|
||||
|
||||
this.server.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
|
||||
'start',
|
||||
callback
|
||||
);
|
||||
|
@ -859,78 +859,78 @@ function serve(path,callback){
|
|||
//Do Nothing
|
||||
}
|
||||
|
||||
function serveNet(host,port,UDPType,callback){
|
||||
if(typeof host=='number'){
|
||||
callback=UDPType;
|
||||
UDPType=port;
|
||||
port=host;
|
||||
host=false;
|
||||
<span class="fstat-no" title="function not covered" >function serveNet(host,port,UDPType,callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof host=='number'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=host;</span>
|
||||
<span class="cstat-no" title="statement not covered" > host=false;</span>
|
||||
}
|
||||
if(typeof host=='function'){
|
||||
callback=host;
|
||||
UDPType=false;
|
||||
host=false;
|
||||
port=false;
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof host=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=host;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
|
||||
<span class="cstat-no" title="statement not covered" > host=false;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
}
|
||||
if(!host){
|
||||
this.log(
|
||||
<span class="cstat-no" title="statement not covered" > if(!host){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Server host not specified, so defaulting to'.notice,
|
||||
'ipc.config.networkHost'.variable,
|
||||
this.config.networkHost.data
|
||||
);
|
||||
host=this.config.networkHost;
|
||||
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(host.toLowerCase()=='udp4' || host.toLowerCase()=='udp6'){
|
||||
<span class="cstat-no" title="statement not covered" > if(host.toLowerCase()=='udp4' || host.toLowerCase()=='udp6'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=host.toLowerCase();</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='string'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof port=='string'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='function'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof port=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
}
|
||||
if(!port){
|
||||
this.log(
|
||||
<span class="cstat-no" title="statement not covered" > if(!port){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Server port not specified, so defaulting to'.notice,
|
||||
'ipc.config.networkPort'.variable,
|
||||
this.config.networkPort
|
||||
);
|
||||
port=this.config.networkPort;
|
||||
<span class="cstat-no" title="statement not covered" > port=this.config.networkPort;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof UDPType=='function'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof UDPType=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=UDPType;</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=false;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
|
||||
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
|
||||
}
|
||||
|
||||
this.server=new Server(
|
||||
<span class="cstat-no" title="statement not covered" > this.server=new Server(</span>
|
||||
host,
|
||||
this.config,
|
||||
log,
|
||||
port
|
||||
);
|
||||
|
||||
if(UDPType){
|
||||
this.server[UDPType]=true;
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(UDPType === "udp4" && host === "::1") {
|
||||
<span class="cstat-no" title="statement not covered" > if(UDPType){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.server[UDPType]=true;</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(UDPType === "udp4" && host === "::1") {</span>
|
||||
// bind udp4 socket to an ipv4 address
|
||||
<span class="cstat-no" title="statement not covered" > this.server.path = "127.0.0.1";</span>
|
||||
}
|
||||
}
|
||||
|
||||
this.server.on(
|
||||
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
|
||||
'start',
|
||||
callback
|
||||
);
|
||||
|
@ -985,38 +985,38 @@ function connect(id,path,callback){
|
|||
callback(this);
|
||||
}
|
||||
|
||||
function connectNet(id,host,port,callback){
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!id){
|
||||
<span class="fstat-no" title="function not covered" >function connectNet(id,host,port,callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!id){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Service id required'.warn,
|
||||
'Requested service connection without specifying service id. Aborting connection attempt'.notice
|
||||
);
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(typeof host=='number'){
|
||||
callback=port;
|
||||
port=host;
|
||||
host=false;
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof host=='number'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=host;</span>
|
||||
<span class="cstat-no" title="statement not covered" > host=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof host=='function'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof host=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=host;</span>
|
||||
<span class="cstat-no" title="statement not covered" > host=false;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="else path not taken" >E</span>if(!host){
|
||||
this.log(
|
||||
<span class="cstat-no" title="statement not covered" > if(!host){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Server host not specified, so defaulting to'.notice,
|
||||
'ipc.config.networkHost'.variable,
|
||||
this.config.networkHost.data
|
||||
);
|
||||
host=this.config.networkHost;
|
||||
<span class="cstat-no" title="statement not covered" > host=this.config.networkHost;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof port=='function'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof port=='function'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=port;</span>
|
||||
<span class="cstat-no" title="statement not covered" > port=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!port){
|
||||
<span class="cstat-no" title="statement not covered" > if(!port){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Server port not specified, so defaulting to'.notice,
|
||||
'ipc.config.networkPort'.variable,
|
||||
|
@ -1025,15 +1025,15 @@ function connectNet(id,host,port,callback){
|
|||
<span class="cstat-no" title="statement not covered" > port=this.config.networkPort;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof callback == 'string'){
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof callback == 'string'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > UDPType=callback;</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=false;</span>
|
||||
}
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(!callback){
|
||||
<span class="cstat-no" title="statement not covered" > if(!callback){</span>
|
||||
<span class="cstat-no" title="statement not covered" > callback=emptyCallback;</span>
|
||||
}
|
||||
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.of[id]){
|
||||
<span class="cstat-no" title="statement not covered" > if(this.of[id]){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!this.of[id].socket.destroyed){</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.log(</span>
|
||||
'Already Connected to'.notice,
|
||||
|
@ -1046,14 +1046,14 @@ function connectNet(id,host,port,callback){
|
|||
<span class="cstat-no" title="statement not covered" > this.of[id].socket.destroy();</span>
|
||||
}
|
||||
|
||||
this.of[id] = new Client(this.config,this.log);
|
||||
this.of[id].id = id;
|
||||
this.of[id].path = host;
|
||||
this.of[id].port = port;
|
||||
<span class="cstat-no" title="statement not covered" > this.of[id] = new Client(this.config,this.log);</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.of[id].id = id;</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.of[id].path = host;</span>
|
||||
<span class="cstat-no" title="statement not covered" > this.of[id].port = port;</span>
|
||||
|
||||
this.of[id].connect();
|
||||
<span class="cstat-no" title="statement not covered" > this.of[id].connect();</span>
|
||||
|
||||
callback(this);
|
||||
<span class="cstat-no" title="statement not covered" > callback(this);</span>
|
||||
}
|
||||
|
||||
module.exports=IPC;
|
||||
|
@ -1063,7 +1063,7 @@ module.exports=IPC;
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
|
@ -20,28 +20,28 @@
|
|||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">65.93% </span>
|
||||
<span class="strong">28.15% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>89/135</span>
|
||||
<span class='fraction'>38/135</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">60.81% </span>
|
||||
<span class="strong">17.57% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>45/74</span>
|
||||
<span class='fraction'>13/74</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">87.5% </span>
|
||||
<span class="strong">50% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>7/8</span>
|
||||
<span class='fraction'>4/8</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">65.93% </span>
|
||||
<span class="strong">28.15% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>89/135</span>
|
||||
<span class='fraction'>38/135</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class='status-line low'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
|
@ -59,16 +59,16 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
|
||||
<td data-value="65.93" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 65%;"></div><div class="cover-empty" style="width:35%;"></div></div></td>
|
||||
<td data-value="65.93" class="pct medium">65.93%</td>
|
||||
<td data-value="135" class="abs medium">89/135</td>
|
||||
<td data-value="60.81" class="pct medium">60.81%</td>
|
||||
<td data-value="74" class="abs medium">45/74</td>
|
||||
<td data-value="87.5" class="pct high">87.5%</td>
|
||||
<td data-value="8" class="abs high">7/8</td>
|
||||
<td data-value="65.93" class="pct medium">65.93%</td>
|
||||
<td data-value="135" class="abs medium">89/135</td>
|
||||
<td class="file low" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
|
||||
<td data-value="28.15" class="pic low"><div class="chart"><div class="cover-fill" style="width: 28%;"></div><div class="cover-empty" style="width:72%;"></div></div></td>
|
||||
<td data-value="28.15" class="pct low">28.15%</td>
|
||||
<td data-value="135" class="abs low">38/135</td>
|
||||
<td data-value="17.57" class="pct low">17.57%</td>
|
||||
<td data-value="74" class="abs low">13/74</td>
|
||||
<td data-value="50" class="pct medium">50%</td>
|
||||
<td data-value="8" class="abs medium">4/8</td>
|
||||
<td data-value="28.15" class="pct low">28.15%</td>
|
||||
<td data-value="135" class="abs low">38/135</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 04:01:27 GMT-0800 (PST)
|
||||
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 15 2017 21:12:19 GMT-0700 (PDT)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue