Merge branch 'master' into master

This commit is contained in:
Melvin 2017-01-24 11:11:39 +01:00 committed by GitHub
commit cfcf815275
20 changed files with 435 additions and 579 deletions

View file

@ -105,7 +105,14 @@ Set these variables in the `ipc.config` scope to overwrite or set default values
maxConnections : 100,
retry : 500,
maxRetries : false,
stopRetrying : false
stopRetrying : false,
interfaces : {
localAddress: false,
localPort : false,
family : false,
hints : false,
lookup : false
}
}
```
@ -127,6 +134,7 @@ Set these variables in the `ipc.config` scope to overwrite or set default values
| retry | this is the time in milliseconds a client will wait before trying to reconnect to a server if the connection is lost. This does not effect UDP sockets since they do not have a client server relationship like Unix Sockets and TCP Sockets. |
| maxRetries | if set, it represents the maximum number of retries after each disconnect before giving up and completely killing a specific connection |
| stopRetrying| Defaults to false meaning clients will continue to retry to connect to servers indefinitely at the retry interval. If set to any number the client will stop retrying when that number is exceeded after each disconnect. If set to true in real time it will immediately stop trying to connect regardless of maxRetries. If set to 0, the client will ***NOT*** try to reconnect. |
| interfaces| primarily used when specifying which interface a client should connect through. see the [socket.connect documentation in the node.js api](https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener) |
----

View file

@ -70,30 +70,47 @@ function connect(){
return;
}
const options={};
if(!client.port){
client.log('Connecting client on Unix Socket :', client.path);
let path = client.path;
options.path=client.path;
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
path = path.replace(/^\//, '');
path = path.replace(/\//g, '-');
path= `\\\\.\\pipe\\${path}`;
options.path = options.path.replace(/^\//, '');
options.path = options.path.replace(/\//g, '-');
options.path= `\\\\.\\pipe\\${options.path}`;
}
client.socket = net.connect(
{
path: path
}
);
client.socket = net.connect(options);
}else{
options.host=client.path;
options.port=client.port;
if(client.config.interface.localAddress){
options.localAddress=client.config.interface.localAddress;
}
if(client.config.interface.localPort){
options.localPort=client.config.interface.localPort;
}
if(client.config.interface.family){
options.family=client.config.interface.family;
}
if(client.config.interface.hints){
options.hints=client.config.interface.hints;
}
if(client.config.interface.lookup){
options.lookup=client.config.interface.lookup;
}
if(!client.config.tls){
client.log('Connecting client via TCP to', client.path ,client.port);
client.socket = net.connect(
{
port:client.port,
host:client.path
}
);
client.log('Connecting client via TCP to', options);
client.socket = net.connect(options);
}else{
client.log('Connecting client via TLS to', client.path ,client.port,client.config.tls);
if(client.config.tls.private){
@ -114,8 +131,7 @@ function connect(){
}
}
client.config.tls.host=client.path;
client.config.tls.port=client.port;
Object.assign(client.config.tls,options);
client.socket = tls.connect(
client.config.tls

View file

@ -69,7 +69,7 @@ function emit(socket, type, data){
message.data=data;
if(this.config.rawBuffer){
console.log(this.config.encoding)
this.log(this.config.encoding)
message=new Buffer(type,this.config.encoding);
}else{
message=eventParser.format(message);
@ -265,8 +265,8 @@ function startServer() {
);
if(!this.udp4 && !this.udp6){
this.log('starting TLS server',this.config.tls);
if(!this.config.tls){
this.log('starting TCP server',this.config.tls);
this.server=net.createServer(
serverCreated.bind(this)
);

View file

@ -21,98 +21,35 @@ class Defaults{
*/
constructor(){
Object.defineProperties(
this,
{
appspace : {
enumerable:true,
writable:true,
value:'app.'
},
socketRoot : {
enumerable:true,
writable:true,
value:'/tmp/'
},
networkHost : {
enumerable:true,
writable:true,
value: ''
},
networkPort : {
enumerable:true,
writable:true,
value:8000
},
id : {
enumerable:true,
writable:true,
value:os.hostname()
},
encoding : {
enumerable:true,
writable:true,
value:'utf8'
},
rawBuffer : {
enumerable:true,
writable:true,
value:false
},
sync : {
enumerable:true,
writable:true,
value:false
},
silent : {
enumerable:true,
writable:true,
value:false
},
logDepth:{
enumerable:true,
writable:true,
value:5
},
logInColor:{
enumerable:true,
writable:true,
value:true
},
maxConnections : {
enumerable:true,
writable:true,
value:100
},
retry : {
enumerable:true,
writable:true,
value:500
},
maxRetries : {
enumerable:true,
writable:true,
value:Infinity
},
stopRetrying : {
enumerable:true,
writable:true,
value:false
},
IPType : {
enumerable:true,
writable:true,
value: getIPType()
},
tls : {
enumerable:true,
writable:true,
value:false
}
}
);
this.appspace='app.';
this.socketRoot='/tmp/';
this.id=os.hostname();
this.encoding='utf8';
this.rawBuffer=false;
this.sync=false;
this.silent=false;
this.logDepth=5;
this.logInColor=true;
this.maxConnections=100;
this.retry=500;
this.maxRetries=Infinity;
this.stopRetrying=false;
this.IPType=getIPType();
this.tls=false;
this.networkHost = (this.IPType == 'IPv6') ? '::1' : '127.0.0.1';
this.networkPort = 8000;
this.interface={
localAddress:false,
localPort:false,
family:false,
hints:false,
lookup:false
}
}
}

View file

@ -1,10 +1,10 @@
const ipc=require('../../../node-ipc');
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'hello';
@ -37,5 +37,3 @@ ipc.connectToNet(
);
}
);
console.log(ipc);

View file

@ -28,7 +28,7 @@ ipc.serveNet(
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
console.log('DISCONNECTED\n\n',arguments);
}
);
}

View file

@ -1,6 +1,6 @@
{
"name": "node-ipc",
"version": "8.9.3",
"version": "8.10.2",
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
"main": "node-ipc.js",
"directories": {
@ -13,14 +13,14 @@
"colors": "*",
"event-pubsub": "4.2.3",
"js-message": ">=1.0.5",
"js-queue": ">=1.0.0",
"node-cmd": ">=1.1.1"
"js-queue": ">=2.0.0"
},
"devDependencies": {
"codacy-coverage": "^1.1.3",
"jasmine": "^2.4.1",
"istanbul": "^0.4.1",
"codacy-coverage": "^1.1.3"
"codacy-coverage": "^2.0.0",
"node-cmd": ">=1.2.0"
},
"scripts": {
"test-windows": "istanbul cover -x **/spec/** -dir ./spec/coverage ./node_modules/jasmine/bin/jasmine.js",

File diff suppressed because one or more lines are too long

View file

@ -20,14 +20,14 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">67.78% </span>
<span class="strong">68.9% </span>
<span class="quiet">Statements</span>
<span class='fraction'>284/419</span>
<span class='fraction'>308/447</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">56.16% </span>
<span class="strong">55.9% </span>
<span class="quiet">Branches</span>
<span class='fraction'>123/219</span>
<span class='fraction'>128/229</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.37% </span>
@ -35,9 +35,9 @@
<span class='fraction'>35/41</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">67.78% </span>
<span class="strong">68.9% </span>
<span class="quiet">Lines</span>
<span class='fraction'>284/419</span>
<span class='fraction'>308/447</span>
</div>
</div>
</div>
@ -73,28 +73,28 @@
<tr>
<td class="file medium" data-value="node-ipc/dao/"><a href="node-ipc/dao/index.html">node-ipc/dao/</a></td>
<td data-value="67.41" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 67%;"></div><div class="cover-empty" style="width:33%;"></div></div></td>
<td data-value="67.41" class="pct medium">67.41%</td>
<td data-value="270" class="abs medium">182/270</td>
<td data-value="53.62" class="pct medium">53.62%</td>
<td data-value="138" class="abs medium">74/138</td>
<td data-value="67.38" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 67%;"></div><div class="cover-empty" style="width:33%;"></div></div></td>
<td data-value="67.38" class="pct medium">67.38%</td>
<td data-value="282" class="abs medium">190/282</td>
<td data-value="53.38" class="pct medium">53.38%</td>
<td data-value="148" class="abs medium">79/148</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="30" class="abs high">25/30</td>
<td data-value="67.41" class="pct medium">67.41%</td>
<td data-value="270" class="abs medium">182/270</td>
<td data-value="67.38" class="pct medium">67.38%</td>
<td data-value="282" class="abs medium">190/282</td>
</tr>
<tr>
<td class="file high" data-value="node-ipc/entities/"><a href="node-ipc/entities/index.html">node-ipc/entities/</a></td>
<td data-value="90" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="96.15" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
<td data-value="96.15" class="pct high">96.15%</td>
<td data-value="26" class="abs high">25/26</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="96.15" class="pct high">96.15%</td>
<td data-value="26" class="abs high">25/26</td>
</tr>
<tr>
@ -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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="prettify.js"></script>

View file

@ -20,14 +20,14 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">71.72% </span>
<span class="strong">71.17% </span>
<span class="quiet">Statements</span>
<span class='fraction'>71/99</span>
<span class='fraction'>79/111</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">51.16% </span>
<span class="strong">50.94% </span>
<span class="quiet">Branches</span>
<span class='fraction'>22/43</span>
<span class='fraction'>27/53</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
@ -35,9 +35,9 @@
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.72% </span>
<span class="strong">71.17% </span>
<span class="quiet">Lines</span>
<span class='fraction'>71/99</span>
<span class='fraction'>79/111</span>
</div>
</div>
</div>
@ -280,7 +280,23 @@
235
236
237
238</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254</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>
@ -353,6 +369,8 @@
<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-yes">7×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7×</span>
@ -362,21 +380,36 @@
<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">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-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-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-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-no">&nbsp;</span>
@ -397,7 +430,6 @@
<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-neutral">&nbsp;</span>
@ -588,31 +620,48 @@ function connect(){
<span class="cstat-no" title="statement not covered" > client.log('\n\n######\nerror: ', client.id ,' client has not specified socket path it wishes to connect to.');</span>
<span class="cstat-no" title="statement not covered" > return;</span>
}
&nbsp;
const options={};
&nbsp;
if(!client.port){
client.log('Connecting client on Unix Socket :', client.path);
&nbsp;
let path = client.path;
options.path=client.path;
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if (process.platform ==='win32' &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >!client.path.startsWith('\\\\.\\pipe\\'))</span>{
<span class="cstat-no" title="statement not covered" > path = path.replace(/^\//, '');</span>
<span class="cstat-no" title="statement not covered" > path = path.replace(/\//g, '-');</span>
<span class="cstat-no" title="statement not covered" > path= `\\\\.\\pipe\\${path}`;</span>
<span class="cstat-no" title="statement not covered" > options.path = options.path.replace(/^\//, '');</span>
<span class="cstat-no" title="statement not covered" > options.path = options.path.replace(/\//g, '-');</span>
<span class="cstat-no" title="statement not covered" > options.path= `\\\\.\\pipe\\${options.path}`;</span>
}
client.socket = net.connect(
{
path: path
}
);
&nbsp;
client.socket = net.connect(options);
}else{
options.host=client.path;
options.port=client.port;
&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" > 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" > 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" > 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" > 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" > 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', client.path ,client.port);
client.socket = net.connect(
{
port:client.port,
host:client.path
}
);
client.log('Connecting client via TCP to', options);
client.socket = net.connect(options);
}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>
@ -633,8 +682,7 @@ function connect(){
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > client.config.tls.host=client.path;</span>
<span class="cstat-no" title="statement not covered" > client.config.tls.port=client.port;</span>
<span class="cstat-no" title="statement not covered" > Object.assign(client.config.tls,options);</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > client.socket = tls.connect(</span>
client.config.tls
@ -760,7 +808,7 @@ module.exports=Client;
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -20,14 +20,14 @@
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">67.41% </span>
<span class="strong">67.38% </span>
<span class="quiet">Statements</span>
<span class='fraction'>182/270</span>
<span class='fraction'>190/282</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">53.62% </span>
<span class="strong">53.38% </span>
<span class="quiet">Branches</span>
<span class='fraction'>74/138</span>
<span class='fraction'>79/148</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
@ -35,9 +35,9 @@
<span class='fraction'>25/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">67.41% </span>
<span class="strong">67.38% </span>
<span class="quiet">Lines</span>
<span class='fraction'>182/270</span>
<span class='fraction'>190/282</span>
</div>
</div>
</div>
@ -60,15 +60,15 @@
</thead>
<tbody><tr>
<td class="file medium" data-value="client.js"><a href="client.js.html">client.js</a></td>
<td data-value="71.72" 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.72" class="pct medium">71.72%</td>
<td data-value="99" class="abs medium">71/99</td>
<td data-value="51.16" class="pct medium">51.16%</td>
<td data-value="43" class="abs medium">22/43</td>
<td data-value="71.17" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 71%;"></div><div class="cover-empty" style="width:29%;"></div></div></td>
<td data-value="71.17" class="pct medium">71.17%</td>
<td data-value="111" class="abs medium">79/111</td>
<td data-value="50.94" class="pct medium">50.94%</td>
<td data-value="53" class="abs medium">27/53</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="71.72" class="pct medium">71.72%</td>
<td data-value="99" class="abs medium">71/99</td>
<td data-value="71.17" class="pct medium">71.17%</td>
<td data-value="111" class="abs medium">79/111</td>
</tr>
<tr>
@ -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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -900,7 +900,7 @@ function emit(socket, type, data){
message.data=data;
&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" > console.log(this.config.encoding)</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);
@ -1091,8 +1091,8 @@ function startServer() {
);
&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.log('starting TCP server',this.config.tls);
this.server=net.createServer(
serverCreated.bind(this)
);
@ -1228,7 +1228,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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 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">90% </span>
<span class="strong">96.15% </span>
<span class="quiet">Statements</span>
<span class='fraction'>9/10</span>
<span class='fraction'>25/26</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">57.14% </span>
@ -35,9 +35,9 @@
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="strong">96.15% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/10</span>
<span class='fraction'>25/26</span>
</div>
</div>
</div>
@ -119,70 +119,7 @@
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
77</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-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -206,97 +143,34 @@
<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-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-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-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-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-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-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-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-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-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-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-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-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-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-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">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-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-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-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-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-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-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -344,98 +218,35 @@ class Defaults{
*/
constructor(){
&nbsp;
Object.defineProperties(
this,
{
appspace : {
enumerable:true,
writable:true,
value:'app.'
},
socketRoot : {
enumerable:true,
writable:true,
value:'/tmp/'
},
networkHost : {
enumerable:true,
writable:true,
value: ''
},
networkPort : {
enumerable:true,
writable:true,
value:8000
},
id : {
enumerable:true,
writable:true,
value:os.hostname()
},
encoding : {
enumerable:true,
writable:true,
value:'utf8'
},
rawBuffer : {
enumerable:true,
writable:true,
value:false
},
sync : {
enumerable:true,
writable:true,
value:false
},
silent : {
enumerable:true,
writable:true,
value:false
},
logDepth:{
enumerable:true,
writable:true,
value:5
},
logInColor:{
enumerable:true,
writable:true,
value:true
},
maxConnections : {
enumerable:true,
writable:true,
value:100
},
retry : {
enumerable:true,
writable:true,
value:500
},
maxRetries : {
enumerable:true,
writable:true,
value:Infinity
},
stopRetrying : {
enumerable:true,
writable:true,
value:false
},
IPType : {
enumerable:true,
writable:true,
value: getIPType()
},
tls : {
enumerable:true,
writable:true,
value:false
}
}
);
this.appspace='app.';
this.socketRoot='/tmp/';
this.id=os.hostname();
&nbsp;
this.encoding='utf8';
this.rawBuffer=false;
this.sync=false;
&nbsp;
this.silent=false;
this.logDepth=5;
this.logInColor=true;
&nbsp;
this.maxConnections=100;
this.retry=500;
this.maxRetries=Infinity;
this.stopRetrying=false;
&nbsp;
this.IPType=getIPType();
this.tls=false;
this.networkHost = (this.IPType == 'IPv6') ? <span class="branch-0 cbranch-no" title="branch not covered" >'::1' </span>: '127.0.0.1';
this.networkPort = 8000;
&nbsp;
this.interface={
localAddress:false,
localPort:false,
family:false,
hints:false,
lookup:false
}
}
}
&nbsp;
@ -466,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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 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">90% </span>
<span class="strong">96.15% </span>
<span class="quiet">Statements</span>
<span class='fraction'>9/10</span>
<span class='fraction'>25/26</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">57.14% </span>
@ -35,9 +35,9 @@
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="strong">96.15% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/10</span>
<span class='fraction'>25/26</span>
</div>
</div>
</div>
@ -60,15 +60,15 @@
</thead>
<tbody><tr>
<td class="file high" data-value="Defaults.js"><a href="Defaults.js.html">Defaults.js</a></td>
<td data-value="90" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="96.15" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
<td data-value="96.15" class="pct high">96.15%</td>
<td data-value="26" class="abs high">25/26</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="96.15" class="pct high">96.15%</td>
<td data-value="26" class="abs high">25/26</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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="../prettify.js"></script>

View file

@ -452,11 +452,11 @@
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">116×</span>
<span class="cline-any cline-yes">376×</span>
<span class="cline-any cline-yes">348×</span>
<span class="cline-any cline-yes">370×</span>
<span class="cline-any cline-yes">336×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">28×</span>
<span class="cline-any cline-yes">34×</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>
@ -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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 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 Mon Dec 19 2016 17:10:46 GMT-0800 (PST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 22 2016 11:36:12 GMT-0800 (PST)
</div>
</div>
<script src="../../prettify.js"></script>

View file

@ -40,9 +40,9 @@ DA:65,116
DA:66,0
DA:69,116
DA:71,116
DA:72,376
DA:73,348
DA:76,28
DA:72,370
DA:73,336
DA:76,34
DA:85,116
DA:90,1
DA:91,7
@ -172,8 +172,8 @@ LF:135
LH:89
BRDA:65,1,0,0
BRDA:65,1,1,116
BRDA:72,2,0,348
BRDA:72,2,1,28
BRDA:72,2,0,336
BRDA:72,2,1,34
BRDA:91,3,0,0
BRDA:91,3,1,7
BRDA:98,4,0,7
@ -250,30 +250,46 @@ end_of_record
TN:
SF:/home/dignow/git/node-ipc/entities/Defaults.js
FN:22,(anonymous_1)
FN:125,getIPType
FN:62,getIPType
FNF:2
FNH:2
FNDA:1,(anonymous_1)
FNDA:1,getIPType
DA:9,1
DA:24,1
DA:115,1
DA:125,1
DA:126,1
DA:127,1
DA:128,1
DA:132,0
DA:136,1
DA:139,1
LF:10
LH:9
BRDA:115,1,0,0
BRDA:115,1,1,1
BRDA:128,2,0,0
BRDA:128,2,1,1
BRDA:128,3,0,1
BRDA:128,3,1,1
BRDA:128,3,2,0
DA:25,1
DA:26,1
DA:28,1
DA:29,1
DA:30,1
DA:32,1
DA:33,1
DA:34,1
DA:36,1
DA:37,1
DA:38,1
DA:39,1
DA:41,1
DA:42,1
DA:43,1
DA:44,1
DA:46,1
DA:62,1
DA:63,1
DA:64,1
DA:65,1
DA:69,0
DA:73,1
DA:76,1
LF:26
LH:25
BRDA:43,1,0,0
BRDA:43,1,1,1
BRDA:65,2,0,0
BRDA:65,2,1,1
BRDA:65,3,0,1
BRDA:65,3,1,1
BRDA:65,3,2,0
BRF:7
BRH:4
end_of_record
@ -283,11 +299,11 @@ FN:16,(anonymous_1)
FN:35,emit
FN:58,syncEmit
FN:63,connect
FN:130,(anonymous_5)
FN:139,connectionMade
FN:148,connectionClosed
FN:174,retryTimeout
FN:187,(anonymous_9)
FN:146,(anonymous_5)
FN:155,connectionMade
FN:164,connectionClosed
FN:190,retryTimeout
FN:203,(anonymous_9)
FNF:9
FNH:9
FNDA:7,(anonymous_1)
@ -327,79 +343,91 @@ DA:68,13
DA:69,0
DA:70,0
DA:73,13
DA:74,7
DA:75,13
DA:76,7
DA:78,7
DA:79,0
DA:80,0
DA:80,7
DA:81,0
DA:83,7
DA:82,0
DA:83,0
DA:86,7
DA:88,6
DA:89,6
DA:90,6
DA:91,6
DA:98,0
DA:99,0
DA:92,0
DA:95,6
DA:96,0
DA:99,6
DA:100,0
DA:102,0
DA:103,0
DA:105,0
DA:106,0
DA:107,0
DA:109,0
DA:110,0
DA:111,0
DA:103,6
DA:104,0
DA:107,6
DA:108,0
DA:111,6
DA:112,6
DA:113,6
DA:115,0
DA:116,0
DA:117,0
DA:118,0
DA:119,0
DA:120,0
DA:126,13
DA:128,13
DA:131,10
DA:132,10
DA:137,13
DA:140,3
DA:141,3
DA:142,3
DA:146,13
DA:149,13
DA:122,0
DA:123,0
DA:124,0
DA:126,0
DA:127,0
DA:128,0
DA:134,0
DA:136,0
DA:142,13
DA:144,13
DA:147,10
DA:148,10
DA:153,13
DA:159,7
DA:160,7
DA:166,7
DA:167,7
DA:168,7
DA:170,7
DA:173,6
DA:175,6
DA:176,6
DA:181,6
DA:185,13
DA:188,7
DA:189,7
DA:190,0
DA:194,0
DA:195,0
DA:198,0
DA:199,0
DA:202,7
DA:203,7
DA:206,7
DA:208,7
DA:209,0
DA:156,3
DA:157,3
DA:158,3
DA:162,13
DA:165,13
DA:169,13
DA:175,7
DA:176,7
DA:182,7
DA:183,7
DA:184,7
DA:186,7
DA:189,6
DA:191,6
DA:192,6
DA:197,6
DA:201,13
DA:204,7
DA:205,7
DA:206,0
DA:210,0
DA:213,7
DA:215,7
DA:216,7
DA:217,7
DA:211,0
DA:214,0
DA:215,0
DA:218,7
DA:219,7
DA:221,7
DA:222,7
DA:228,7
DA:229,0
DA:224,7
DA:225,0
DA:226,0
DA:229,7
DA:231,7
DA:232,7
DA:237,1
LF:99
LH:71
DA:233,7
DA:234,7
DA:235,7
DA:237,7
DA:238,7
DA:244,7
DA:245,0
DA:248,7
DA:253,1
LF:111
LH:79
BRDA:11,1,0,1
BRDA:11,1,1,0
BRDA:28,2,0,7
@ -410,41 +438,51 @@ BRDA:48,4,0,1
BRDA:48,4,1,6
BRDA:68,5,0,0
BRDA:68,5,1,13
BRDA:73,6,0,7
BRDA:73,6,1,6
BRDA:78,7,0,0
BRDA:78,7,1,7
BRDA:78,8,0,7
BRDA:78,8,1,0
BRDA:89,9,0,6
BRDA:89,9,1,0
BRDA:99,10,0,0
BRDA:99,10,1,0
BRDA:102,11,0,0
BRDA:102,11,1,0
BRDA:105,12,0,0
BRDA:105,12,1,0
BRDA:106,13,0,0
BRDA:106,13,1,0
BRDA:153,14,0,7
BRDA:153,14,1,6
BRDA:154,15,0,13
BRDA:154,15,1,8
BRDA:154,15,2,6
BRDA:189,16,0,0
BRDA:189,16,1,7
BRDA:194,17,0,0
BRDA:194,17,1,0
BRDA:202,18,0,7
BRDA:202,18,1,0
BRDA:208,19,0,0
BRDA:208,19,1,7
BRDA:208,20,0,7
BRDA:208,20,1,7
BRDA:228,21,0,0
BRDA:228,21,1,7
BRF:43
BRH:22
BRDA:75,6,0,7
BRDA:75,6,1,6
BRDA:80,7,0,0
BRDA:80,7,1,7
BRDA:80,8,0,7
BRDA:80,8,1,0
BRDA:91,9,0,0
BRDA:91,9,1,6
BRDA:95,10,0,0
BRDA:95,10,1,6
BRDA:99,11,0,0
BRDA:99,11,1,6
BRDA:103,12,0,0
BRDA:103,12,1,6
BRDA:107,13,0,0
BRDA:107,13,1,6
BRDA:111,14,0,6
BRDA:111,14,1,0
BRDA:116,15,0,0
BRDA:116,15,1,0
BRDA:119,16,0,0
BRDA:119,16,1,0
BRDA:122,17,0,0
BRDA:122,17,1,0
BRDA:123,18,0,0
BRDA:123,18,1,0
BRDA:169,19,0,7
BRDA:169,19,1,6
BRDA:170,20,0,13
BRDA:170,20,1,8
BRDA:170,20,2,6
BRDA:205,21,0,0
BRDA:205,21,1,7
BRDA:210,22,0,0
BRDA:210,22,1,0
BRDA:218,23,0,7
BRDA:218,23,1,0
BRDA:224,24,0,0
BRDA:224,24,1,7
BRDA:224,25,0,7
BRDA:224,25,1,7
BRDA:244,26,0,0
BRDA:244,26,1,7
BRF:53
BRH:27
end_of_record
TN:
SF:/home/dignow/git/node-ipc/dao/eventParser.js
@ -741,8 +779,8 @@ BRDA:262,29,0,2
BRDA:262,29,1,2
BRDA:262,30,0,4
BRDA:262,30,1,3
BRDA:263,31,0,2
BRDA:263,31,1,0
BRDA:264,31,0,2
BRDA:264,31,1,0
BRDA:273,32,0,1
BRDA:273,32,1,1
BRDA:298,33,0,1