allow server to emit for single socket or an array of sockets

This commit is contained in:
RIAEvangelist 2017-02-14 05:34:38 -08:00
parent b2b05a1d16
commit 26077e2405
14 changed files with 1263 additions and 1234 deletions

View file

@ -62,7 +62,12 @@ class Server extends Events{
}
}
function emit(socket, type, data){
function emit(sockets, type, data){
if(! (sockets instanceof Array)){
sockets=[sockets];
}
for(const socket of sockets){
this.log('dispatching event to socket', ' : ', type, data);
let message=new Message;
@ -93,6 +98,7 @@ function emit(socket, type, data){
socket.write(message);
}
}
function broadcast(type,data){
this.log('broadcasting event to all known sockets listening to ', this.path,' : ', ((this.port)?this.port:''), type, data);

File diff suppressed because one or more lines are too long

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">68.11% </span>
<span class="strong">39.87% </span>
<span class="quiet">Statements</span>
<span class='fraction'>314/461</span>
<span class='fraction'>185/464</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">55.37% </span>
<span class="strong">25% </span>
<span class="quiet">Branches</span>
<span class='fraction'>134/242</span>
<span class='fraction'>61/244</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.37% </span>
<span class="strong">53.66% </span>
<span class="quiet">Functions</span>
<span class='fraction'>35/41</span>
<span class='fraction'>22/41</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">68.11% </span>
<span class="strong">39.87% </span>
<span class="quiet">Lines</span>
<span class='fraction'>314/461</span>
<span class='fraction'>185/464</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,16 +72,16 @@
</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="66.22" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 66%;"></div><div class="cover-empty" style="width:34%;"></div></div></td>
<td data-value="66.22" class="pct medium">66.22%</td>
<td data-value="296" class="abs medium">196/296</td>
<td data-value="52.8" class="pct medium">52.8%</td>
<td data-value="161" class="abs medium">85/161</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="66.22" class="pct medium">66.22%</td>
<td data-value="296" class="abs medium">196/296</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="32.78" class="pic low"><div class="chart"><div class="cover-fill" style="width: 32%;"></div><div class="cover-empty" style="width:68%;"></div></div></td>
<td data-value="32.78" class="pct low">32.78%</td>
<td data-value="299" class="abs low">98/299</td>
<td data-value="17.79" class="pct low">17.79%</td>
<td data-value="163" class="abs low">29/163</td>
<td data-value="46.67" class="pct low">46.67%</td>
<td data-value="30" class="abs low">14/30</td>
<td data-value="32.78" class="pct low">32.78%</td>
<td data-value="299" class="abs low">98/299</td>
</tr>
<tr>
@ -98,16 +98,16 @@
</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="42.96" class="pic low"><div class="chart"><div class="cover-fill" style="width: 42%;"></div><div class="cover-empty" style="width:58%;"></div></div></td>
<td data-value="42.96" class="pct low">42.96%</td>
<td data-value="135" class="abs low">58/135</td>
<td data-value="37.84" class="pct low">37.84%</td>
<td data-value="74" class="abs low">28/74</td>
<td data-value="62.5" class="pct medium">62.5%</td>
<td data-value="8" class="abs medium">5/8</td>
<td data-value="42.96" class="pct low">42.96%</td>
<td data-value="135" class="abs low">58/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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">71.68% </span>
<span class="strong">48.67% </span>
<span class="quiet">Statements</span>
<span class='fraction'>81/113</span>
<span class='fraction'>55/113</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50.91% </span>
<span class="strong">27.27% </span>
<span class="quiet">Branches</span>
<span class='fraction'>28/55</span>
<span class='fraction'>15/55</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">88.89% </span>
<span class="quiet">Functions</span>
<span class='fraction'>9/9</span>
<span class='fraction'>8/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.68% </span>
<span class="strong">48.67% </span>
<span class="quiet">Lines</span>
<span class='fraction'>81/113</span>
<span class='fraction'>55/113</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
@ -320,8 +320,8 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -339,46 +339,46 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
@ -391,74 +391,101 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -466,57 +493,30 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -529,37 +529,37 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -639,7 +639,7 @@ function connect(){
&nbsp;
const options={};
&nbsp;
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);
&nbsp;
options.path=client.path;
@ -652,32 +652,32 @@ function connect(){
&nbsp;
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>
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
<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>
@ -775,9 +775,9 @@ function connect(){
&nbsp;
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)
@ -790,37 +790,37 @@ function connect(){
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<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>
}
&nbsp;
data=(this.ipcBuffer+=data);
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
&nbsp;
<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" > client.log('Messages are large, You may want to consider smaller messages.');</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
this.ipcBuffer='';
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
&nbsp;
const events = eventParser.parse(data);
const eCount = events.length;
for(let i=0; i&lt;eCount; i++){
let message=new Message;
message.load(events[i]);
<span class="cstat-no" title="statement not covered" > const events = eventParser.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&lt;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>
&nbsp;
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
);
}
&nbsp;
<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>
}
&nbsp;
client.queue.next();
<span class="cstat-no" title="statement not covered" > client.queue.next();</span>
}
);
}
@ -832,7 +832,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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,9 +20,9 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">84.62% </span>
<span class="strong">61.54% </span>
<span class="quiet">Statements</span>
<span class='fraction'>11/13</span>
<span class='fraction'>8/13</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">42.86% </span>
@ -30,18 +30,18 @@
<span class='fraction'>3/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">50% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
<span class='fraction'>1/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.62% </span>
<span class="strong">61.54% </span>
<span class="quiet">Lines</span>
<span class='fraction'>11/13</span>
<span class='fraction'>8/13</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
@ -79,21 +79,21 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-yes">8×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
@ -117,10 +117,10 @@ function formatData(message){
return message;
}
&nbsp;
function parseDataEvents(data){
let events=data.split(parser.delimiter);
events.pop();
return events;
<span class="fstat-no" title="function not covered" >function parseDataEvents(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>
}
&nbsp;
module.exports=parser;
@ -130,7 +130,7 @@ module.exports=parser;
</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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">66.22% </span>
<span class="strong">32.78% </span>
<span class="quiet">Statements</span>
<span class='fraction'>196/296</span>
<span class='fraction'>98/299</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">52.8% </span>
<span class="strong">17.79% </span>
<span class="quiet">Branches</span>
<span class='fraction'>85/161</span>
<span class='fraction'>29/163</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="strong">46.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>25/30</span>
<span class='fraction'>14/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.22% </span>
<span class="strong">32.78% </span>
<span class="quiet">Lines</span>
<span class='fraction'>196/296</span>
<span class='fraction'>98/299</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,42 @@
</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.68" 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.68" class="pct medium">71.68%</td>
<td data-value="113" class="abs medium">81/113</td>
<td data-value="50.91" class="pct medium">50.91%</td>
<td data-value="55" class="abs medium">28/55</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="71.68" class="pct medium">71.68%</td>
<td data-value="113" class="abs medium">81/113</td>
<td class="file low" data-value="client.js"><a href="client.js.html">client.js</a></td>
<td data-value="48.67" class="pic low"><div class="chart"><div class="cover-fill" style="width: 48%;"></div><div class="cover-empty" style="width:52%;"></div></div></td>
<td data-value="48.67" class="pct low">48.67%</td>
<td data-value="113" class="abs low">55/113</td>
<td data-value="27.27" class="pct low">27.27%</td>
<td data-value="55" class="abs low">15/55</td>
<td data-value="88.89" class="pct high">88.89%</td>
<td data-value="9" class="abs high">8/9</td>
<td data-value="48.67" class="pct low">48.67%</td>
<td data-value="113" class="abs low">55/113</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 class="file medium" data-value="eventParser.js"><a href="eventParser.js.html">eventParser.js</a></td>
<td data-value="61.54" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 61%;"></div><div class="cover-empty" style="width:39%;"></div></div></td>
<td data-value="61.54" class="pct medium">61.54%</td>
<td data-value="13" class="abs medium">8/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>
<td data-value="50" class="pct medium">50%</td>
<td data-value="2" class="abs medium">1/2</td>
<td data-value="61.54" class="pct medium">61.54%</td>
<td data-value="13" class="abs medium">8/13</td>
</tr>
<tr>
<td class="file medium" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
<td data-value="61.18" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 61%;"></div><div class="cover-empty" style="width:39%;"></div></div></td>
<td data-value="61.18" class="pct medium">61.18%</td>
<td data-value="170" class="abs medium">104/170</td>
<td data-value="54.55" class="pct medium">54.55%</td>
<td data-value="99" class="abs medium">54/99</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="61.18" class="pct medium">61.18%</td>
<td data-value="170" class="abs medium">104/170</td>
<td class="file low" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
<td data-value="20.23" class="pic low"><div class="chart"><div class="cover-fill" style="width: 20%;"></div><div class="cover-empty" style="width:80%;"></div></div></td>
<td data-value="20.23" class="pct low">20.23%</td>
<td data-value="173" class="abs low">35/173</td>
<td data-value="10.89" class="pct low">10.89%</td>
<td data-value="101" class="abs low">11/101</td>
<td data-value="26.32" class="pct low">26.32%</td>
<td data-value="19" class="abs low">5/19</td>
<td data-value="20.23" class="pct low">20.23%</td>
<td data-value="173" class="abs low">35/173</td>
</tr>
</tbody>
@ -103,7 +103,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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">61.18% </span>
<span class="strong">20.23% </span>
<span class="quiet">Statements</span>
<span class='fraction'>104/170</span>
<span class='fraction'>35/173</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">54.55% </span>
<span class="strong">10.89% </span>
<span class="quiet">Branches</span>
<span class='fraction'>54/99</span>
<span class='fraction'>11/101</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">73.68% </span>
<span class="strong">26.32% </span>
<span class="quiet">Functions</span>
<span class='fraction'>14/19</span>
<span class='fraction'>5/19</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">61.18% </span>
<span class="strong">20.23% </span>
<span class="quiet">Lines</span>
<span class='fraction'>104/170</span>
<span class='fraction'>35/173</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
@ -454,7 +454,13 @@
409
410
411
412</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
412
413
414
415
416
417
418</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -470,8 +476,8 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</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-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -488,68 +494,74 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -574,17 +586,17 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -598,23 +610,23 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -624,36 +636,36 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</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-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -662,26 +674,26 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
@ -690,92 +702,43 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -783,26 +746,75 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -843,15 +855,15 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -912,8 +924,8 @@ class Server extends Events{
);
}
&nbsp;
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>
}
&nbsp;
start(){
@ -929,37 +941,43 @@ class Server extends Events{
}
}
&nbsp;
function emit(socket, type, data){
this.log('dispatching event to socket', ' : ', type, data);
function emit(sockets, type, data){
<span class="missing-if-branch" title="if path not taken" >I</span>if(! sockets instanceof Array){
<span class="cstat-no" title="statement not covered" > sockets=[sockets];</span>
}
&nbsp;
let message=new Message;
message.type=type;
message.data=data;
for(socket of sockets){
<span class="cstat-no" title="statement not covered" > this.log('dispatching event to socket', ' : ', type, data);</span>
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if(this.config.rawBuffer){
<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>
&nbsp;
<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>
}
&nbsp;
<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>
&nbsp;
<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>
}
&nbsp;
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>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > socket.write(message);</span>
}
}
&nbsp;
<span class="fstat-no" title="function not covered" >function broadcast(type,data){</span>
<span class="cstat-no" title="statement not covered" > this.log('broadcasting event to all known sockets listening to ', this.path,' : ', ((this.port)?this.port:''), type, data);</span>
@ -984,18 +1002,18 @@ function emit(socket, type, data){
}
}
&nbsp;
function serverClosed(){
for(let i=0, count=this.sockets.length; i&lt;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&lt;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>
&nbsp;
<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>
}
}
&nbsp;
<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>
<span class="cstat-no" title="statement not covered" > if(this.of[socket.id]){</span>
<span class="cstat-no" title="statement not covered" > const group=this.of[socket.id];</span>
@ -1009,23 +1027,23 @@ function serverClosed(){
}
}
&nbsp;
this.log('socket disconnected',destroyedSocketId.toString());
<span class="cstat-no" title="statement not covered" > this.log('socket disconnected',destroyedSocketId.toString());</span>
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if(socket &amp;&amp; socket.destroy){
<span class="cstat-no" title="statement not covered" > if(socket &amp;&amp; socket.destroy){</span>
<span class="cstat-no" title="statement not covered" > socket.destroy();</span>
}
&nbsp;
this.sockets.splice(i,1);
<span class="cstat-no" title="statement not covered" > this.sockets.splice(i,1);</span>
&nbsp;
this.publish('socket.disconnected', socket, destroyedSocketId);
<span class="cstat-no" title="statement not covered" > this.publish('socket.disconnected', socket, destroyedSocketId);</span>
&nbsp;
return;
<span class="cstat-no" title="statement not covered" > return;</span>
}
}
&nbsp;
function gotData(socket,data,UDPSocket){
let sock=((this.udp4 || this.udp6)? UDPSocket : socket);
<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',
@ -1035,36 +1053,36 @@ function gotData(socket,data,UDPSocket){
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
<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>
}
&nbsp;
data=(this.ipcBuffer+=data);
<span class="cstat-no" title="statement not covered" > data=(this.ipcBuffer+=data);</span>
&nbsp;
<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>
}
&nbsp;
this.ipcBuffer='';
<span class="cstat-no" title="statement not covered" > this.ipcBuffer='';</span>
&nbsp;
data=eventParser.parse(data);
<span class="cstat-no" title="statement not covered" > data=eventParser.parse(data);</span>
&nbsp;
while(data.length&gt;0){
let message=new Message;
message.load(data.shift());
<span class="cstat-no" title="statement not covered" > while(data.length&gt;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>
&nbsp;
<span class="missing-if-branch" title="else path not taken" >E</span>if (!sock.id &amp;&amp; message.data &amp;&amp; message.data.id){
sock.id=message.data.id;
<span class="missing-if-branch" title="else path not taken" >E</span>if(!this.of[sock.id]){
this.of[sock.id]=[];
<span class="cstat-no" title="statement not covered" > if (!sock.id &amp;&amp; message.data &amp;&amp; message.data.id){</span>
<span class="cstat-no" title="statement not covered" > sock.id=message.data.id;</span>
<span class="cstat-no" title="statement not covered" > if(!this.of[sock.id]){</span>
<span class="cstat-no" title="statement not covered" > this.of[sock.id]=[];</span>
}
this.of[sock.id].push(sock);
<span class="cstat-no" title="statement not covered" > this.of[sock.id].push(sock);</span>
}
&nbsp;
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>
&nbsp;
this.publish(
<span class="cstat-no" title="statement not covered" > this.publish(</span>
message.type,
message.data,
sock
@ -1072,27 +1090,27 @@ function gotData(socket,data,UDPSocket){
}
}
&nbsp;
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
);
}
&nbsp;
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>
&nbsp;
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>
}
&nbsp;
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)
);
&nbsp;
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>
@ -1101,36 +1119,36 @@ function serverCreated(socket) {
}.bind(this)
);
&nbsp;
socket.on(
<span class="cstat-no" title="statement not covered" > socket.on(</span>
'data',
gotData.bind(this,socket)
);
&nbsp;
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>
}
&nbsp;
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>
&nbsp;
<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)
);
&nbsp;
this.publish(
<span class="cstat-no" title="statement not covered" > this.publish(</span>
'connect',
socket
);
&nbsp;
<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>
}
}
@ -1141,13 +1159,13 @@ function startServer() {
&nbsp;
this.log(
'starting server on ',this.path,
((this.port)?`:${this.port}`:'')
((this.port)?`:${this.port}`:<span class="branch-1 cbranch-no" title="branch not covered" >'')</span>
);
&nbsp;
if(!this.udp4 &amp;&amp; !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="missing-if-branch" title="if path not taken" >I</span>if(!this.udp4 &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >!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{
@ -1155,13 +1173,13 @@ function startServer() {
}
}else{
this.server=dgram.createSocket(
((this.udp4)? 'udp4':'udp6')
((this.udp4)? 'udp4':<span class="branch-1 cbranch-no" title="branch not covered" >'udp6')</span>
);
this.server.write=UDPWrite.bind(this);
this.server.on(
'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)
);
}
@ -1180,33 +1198,33 @@ function startServer() {
&nbsp;
this.server.maxConnections=this.config.maxConnections;
&nbsp;
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="missing-if-branch" title="if path not taken" >I</span>if(!this.port){
<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>
}
&nbsp;
this.server.listen(
<span class="cstat-no" title="statement not covered" > this.server.listen(</span>
this.path,
this.onStart.bind(this)
);
&nbsp;
return;
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
if(!this.udp4 &amp;&amp; !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="missing-if-branch" title="if path not taken" >I</span>if(!this.udp4 &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >!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>
}
&nbsp;
this.log('starting server as',((this.udp4)? 'udp4':'udp6'));
this.log('starting server as',((this.udp4)? 'udp4':<span class="branch-1 cbranch-no" title="branch not covered" >'udp6')</span>);
&nbsp;
this.server.bind(
this.port,
@ -1253,16 +1271,16 @@ function startServer() {
);
}
&nbsp;
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',
@ -1282,7 +1300,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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -277,7 +277,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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">65.93% </span>
<span class="strong">42.96% </span>
<span class="quiet">Statements</span>
<span class='fraction'>89/135</span>
<span class='fraction'>58/135</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">60.81% </span>
<span class="strong">37.84% </span>
<span class="quiet">Branches</span>
<span class='fraction'>45/74</span>
<span class='fraction'>28/74</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="strong">62.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/8</span>
<span class='fraction'>5/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">65.93% </span>
<span class="strong">42.96% </span>
<span class="quiet">Lines</span>
<span class='fraction'>89/135</span>
<span class='fraction'>58/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">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">101×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">101×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">101×</span>
<span class="cline-any cline-yes">335×</span>
<span class="cline-any cline-yes">302×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-yes">167×</span>
<span class="cline-any cline-yes">154×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33×</span>
<span class="cline-any cline-yes">13×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -465,102 +465,54 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">101×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -568,31 +520,79 @@
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</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">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -648,37 +648,24 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -687,15 +674,28 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -708,14 +708,14 @@
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
@ -825,12 +825,12 @@ function disconnect(id){
delete this.of[id];
}
&nbsp;
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>
}
&nbsp;
<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>
}
&nbsp;
this.server=new Server(
<span class="cstat-no" title="statement not covered" > this.server=new Server(</span>
path,
this.config,
log
);
&nbsp;
this.server.on(
<span class="cstat-no" title="statement not covered" > this.server.on(</span>
'start',
callback
);
@ -860,19 +860,19 @@ function serve(path,callback){
}
&nbsp;
function serveNet(host,port,UDPType,callback){
if(typeof host=='number'){
<span class="missing-if-branch" title="else path not taken" >E</span>if(typeof host=='number'){
callback=UDPType;
UDPType=port;
port=host;
host=false;
}
if(typeof host=='function'){
callback=host;
UDPType=false;
host=false;
port=false;
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof host=='function'){
<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){
<span class="missing-if-branch" title="else path not taken" >E</span>if(!host){
this.log(
'Server host not specified, so defaulting to'.notice,
'ipc.config.networkHost'.variable,
@ -897,13 +897,13 @@ function serveNet(host,port,UDPType,callback){
<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="missing-if-branch" title="if path not taken" >I</span>if(!port){
<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>
}
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if(typeof UDPType=='function'){
@ -922,7 +922,7 @@ function serveNet(host,port,UDPType,callback){
port
);
&nbsp;
if(UDPType){
<span class="missing-if-branch" title="else path not taken" >E</span>if(UDPType){
this.server[UDPType]=true;
<span class="missing-if-branch" title="if path not taken" >I</span>if(UDPType === "udp4" &amp;&amp; host === "::1") {
// bind udp4 socket to an ipv4 address
@ -985,38 +985,38 @@ function connect(id,path,callback){
callback(this);
}
&nbsp;
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>
}
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
<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>
}
&nbsp;
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>
&nbsp;
this.of[id].connect();
<span class="cstat-no" title="statement not covered" > this.of[id].connect();</span>
&nbsp;
callback(this);
<span class="cstat-no" title="statement not covered" > callback(this);</span>
}
&nbsp;
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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,28 +20,28 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">65.93% </span>
<span class="strong">42.96% </span>
<span class="quiet">Statements</span>
<span class='fraction'>89/135</span>
<span class='fraction'>58/135</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">60.81% </span>
<span class="strong">37.84% </span>
<span class="quiet">Branches</span>
<span class='fraction'>45/74</span>
<span class='fraction'>28/74</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="strong">62.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/8</span>
<span class='fraction'>5/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">65.93% </span>
<span class="strong">42.96% </span>
<span class="quiet">Lines</span>
<span class='fraction'>89/135</span>
<span class='fraction'>58/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="42.96" class="pic low"><div class="chart"><div class="cover-fill" style="width: 42%;"></div><div class="cover-empty" style="width:58%;"></div></div></td>
<td data-value="42.96" class="pct low">42.96%</td>
<td data-value="135" class="abs low">58/135</td>
<td data-value="37.84" class="pct low">37.84%</td>
<td data-value="74" class="abs low">28/74</td>
<td data-value="62.5" class="pct medium">62.5%</td>
<td data-value="8" class="abs medium">5/8</td>
<td data-value="42.96" class="pct low">42.96%</td>
<td data-value="135" class="abs low">58/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 05:22:08 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 14 2017 05:27:40 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

File diff suppressed because it is too large Load diff