diff --git a/README.md b/README.md
index eddf091..7224147 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,20 @@
node-ipc
================
-*a nodejs module for local and remote Inter Process Communication* with full support for Linux, Mac and Windows.
-A great solution for **Neural Networking** in Node.JS
+*a nodejs module for local and remote Inter Process Communication* with full support for Linux, Mac and Windows. It also supports all forms of socket communication from low level unix and windows sockets to UDP and secure TLS and TCP sockets.
+
+A great solution for complex multiprocess **Neural Networking** in Node.JS
**npm install node-ipc**
+### Testing
+
+` npm test ` will run the jasmine tests with istanbul for node-ipc and generate a coverage report in the spec folder.
+
+Tests are currently being re-written in Jasmine and Istanbul so you may want to install these globally with ` sudo npm install -g jasmine istanbul `
+
+As of the last commit the test servers do not auto close after completion so you may want to manually kill them after running the test suite.
+
+#### NPM Stats
npm info : [See npm trends and stats for node-ipc](http://npm-stat.com/charts.html?package=node-ipc&author=&from=&to=)
[![NPM](https://nodei.co/npm/node-ipc.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/node-ipc/)
diff --git a/example/UDPSocket/basic/hello-client.js b/example/UDPSocket/basic/hello-client.js
index cfe41d7..9b8cf9d 100644
--- a/example/UDPSocket/basic/hello-client.js
+++ b/example/UDPSocket/basic/hello-client.js
@@ -1,22 +1,22 @@
var ipc=require('../../../node-ipc');
/***************************************\
- *
+ *
* UDP Client is really a UDP server
- *
- * Dedicated UDP sockets on the same
+ *
+ * Dedicated UDP sockets on the same
* machine can not be bound to in the
* traditional client/server method
- *
+ *
* Every UDP socket is it's own UDP server
* And so must have a unique port on its
* machine, unlike TCP or Unix Sockts
* which can share on the same machine.
- *
+ *
* Since there is no open client server
* relationship, you should start world
* first and then hello.
- *
+ *
* *************************************/
ipc.config.id = 'hello';
@@ -49,4 +49,4 @@ ipc.serveNet(
-ipc.server.start();
\ No newline at end of file
+ipc.server.start();
diff --git a/package.json b/package.json
index a604372..b094a2d 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,13 @@
"js-queue": "^0.1.2",
"node-cmd": "*"
},
- "devDependencies": {},
+ "devDependencies": {
+ "blanket": "^1.2.1",
+ "codacy-coverage": "^1.1.3",
+ "jasmine": "^2.4.1"
+ },
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "istanbul cover -x **/spec/** -dir ./spec/coverage jasmine"
},
"keywords": [
"IPC",
diff --git a/spec/coverage/coverage.json b/spec/coverage/coverage.json
new file mode 100644
index 0000000..1b79bd3
--- /dev/null
+++ b/spec/coverage/coverage.json
@@ -0,0 +1 @@
+{"/home/bmiller/git/node-ipc/node-ipc.js":{"path":"/home/bmiller/git/node-ipc/node-ipc.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":140,"8":69,"9":71,"10":71,"11":229,"12":210,"13":19,"14":71,"15":1,"16":8,"17":0,"18":8,"19":8,"20":8,"21":8,"22":8,"23":8,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":0,"33":1,"34":1,"35":1,"36":3,"37":1,"38":1,"39":1,"40":1,"41":3,"42":1,"43":1,"44":1,"45":1,"46":3,"47":2,"48":2,"49":3,"50":0,"51":0,"52":0,"53":0,"54":3,"55":0,"56":0,"57":0,"58":3,"59":0,"60":0,"61":0,"62":3,"63":1,"64":1,"65":3,"66":0,"67":0,"68":3,"69":0,"70":3,"71":3,"72":2,"73":3,"74":1,"75":4,"76":2,"77":2,"78":4,"79":0,"80":4,"81":0,"82":0,"83":4,"84":2,"85":2,"86":4,"87":0,"88":0,"89":0,"90":0,"91":0,"92":4,"93":4,"94":4,"95":4,"96":4,"97":1,"98":4,"99":0,"100":0,"101":4,"102":4,"103":4,"104":4,"105":4,"106":0,"107":0,"108":0,"109":4,"110":4,"111":4,"112":4,"113":0,"114":0,"115":4,"116":0,"117":0,"118":4,"119":0,"120":0,"121":4,"122":0,"123":4,"124":0,"125":0,"126":0,"127":0,"128":0,"129":4,"130":4,"131":4,"132":4,"133":4,"134":4,"135":1},"b":{"1":[0,1],"2":[69,71],"3":[210,19],"4":[0,8],"5":[8,0],"6":[8,0],"7":[1,0],"8":[1,0],"9":[0,1],"10":[1,2],"11":[1,2],"12":[2,1],"13":[0,3],"14":[3,3],"15":[0,3],"16":[0,3],"17":[1,2],"18":[0,3],"19":[0,3],"20":[2,1],"21":[2,2],"22":[0,4],"23":[0,4],"24":[2,2],"25":[0,4],"26":[0,0],"27":[0,4],"28":[4,0],"29":[0,4],"30":[4,0],"31":[0,4],"32":[0,4],"33":[0,4],"34":[0,4],"35":[0,4],"36":[0,0]},"f":{"1":140,"2":8,"3":1,"4":0,"5":3,"6":0,"7":4,"8":0,"9":4,"10":0},"fnMap":{"1":{"name":"log","line":56,"loc":{"start":{"line":56,"column":0},"end":{"line":56,"column":14}}},"2":{"name":"disconnect","line":74,"loc":{"start":{"line":74,"column":0},"end":{"line":74,"column":23}}},"3":{"name":"serve","line":89,"loc":{"start":{"line":89,"column":0},"end":{"line":89,"column":29}}},"4":{"name":"(anonymous_4)","line":104,"loc":{"start":{"line":104,"column":17},"end":{"line":104,"column":27}}},"5":{"name":"serveNet","line":118,"loc":{"start":{"line":118,"column":0},"end":{"line":118,"column":45}}},"6":{"name":"(anonymous_6)","line":171,"loc":{"start":{"line":171,"column":17},"end":{"line":171,"column":27}}},"7":{"name":"connect","line":190,"loc":{"start":{"line":190,"column":0},"end":{"line":190,"column":34}}},"8":{"name":"(anonymous_8)","line":197,"loc":{"start":{"line":197,"column":17},"end":{"line":197,"column":27}}},"9":{"name":"connectNet","line":238,"loc":{"start":{"line":238,"column":0},"end":{"line":238,"column":42}}},"10":{"name":"(anonymous_10)","line":283,"loc":{"start":{"line":283,"column":17},"end":{"line":283,"column":27}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":8,"column":51}},"2":{"start":{"line":10,"column":0},"end":{"line":20,"column":2}},"3":{"start":{"line":22,"column":0},"end":{"line":24,"column":11}},"4":{"start":{"line":26,"column":0},"end":{"line":42,"column":1}},"5":{"start":{"line":44,"column":0},"end":{"line":54,"column":1}},"6":{"start":{"line":56,"column":0},"end":{"line":72,"column":1}},"7":{"start":{"line":57,"column":4},"end":{"line":58,"column":15}},"8":{"start":{"line":58,"column":8},"end":{"line":58,"column":15}},"9":{"start":{"line":60,"column":4},"end":{"line":60,"column":51}},"10":{"start":{"line":62,"column":4},"end":{"line":67,"column":5}},"11":{"start":{"line":63,"column":8},"end":{"line":64,"column":21}},"12":{"start":{"line":64,"column":12},"end":{"line":64,"column":21}},"13":{"start":{"line":66,"column":8},"end":{"line":66,"column":52}},"14":{"start":{"line":69,"column":4},"end":{"line":71,"column":6}},"15":{"start":{"line":74,"column":0},"end":{"line":87,"column":1}},"16":{"start":{"line":75,"column":4},"end":{"line":76,"column":15}},"17":{"start":{"line":76,"column":8},"end":{"line":76,"column":15}},"18":{"start":{"line":78,"column":4},"end":{"line":78,"column":40}},"19":{"start":{"line":80,"column":4},"end":{"line":80,"column":24}},"20":{"start":{"line":81,"column":4},"end":{"line":84,"column":5}},"21":{"start":{"line":82,"column":8},"end":{"line":83,"column":40}},"22":{"start":{"line":83,"column":12},"end":{"line":83,"column":40}},"23":{"start":{"line":86,"column":4},"end":{"line":86,"column":22}},"24":{"start":{"line":89,"column":0},"end":{"line":116,"column":1}},"25":{"start":{"line":90,"column":4},"end":{"line":93,"column":5}},"26":{"start":{"line":91,"column":8},"end":{"line":91,"column":22}},"27":{"start":{"line":92,"column":8},"end":{"line":92,"column":19}},"28":{"start":{"line":94,"column":4},"end":{"line":101,"column":5}},"29":{"start":{"line":95,"column":8},"end":{"line":99,"column":10}},"30":{"start":{"line":100,"column":8},"end":{"line":100,"column":69}},"31":{"start":{"line":103,"column":4},"end":{"line":104,"column":30}},"32":{"start":{"line":104,"column":8},"end":{"line":104,"column":30}},"33":{"start":{"line":106,"column":4},"end":{"line":110,"column":6}},"34":{"start":{"line":112,"column":4},"end":{"line":115,"column":6}},"35":{"start":{"line":118,"column":0},"end":{"line":188,"column":1}},"36":{"start":{"line":119,"column":4},"end":{"line":124,"column":5}},"37":{"start":{"line":120,"column":8},"end":{"line":120,"column":25}},"38":{"start":{"line":121,"column":8},"end":{"line":121,"column":21}},"39":{"start":{"line":122,"column":8},"end":{"line":122,"column":18}},"40":{"start":{"line":123,"column":8},"end":{"line":123,"column":19}},"41":{"start":{"line":125,"column":4},"end":{"line":130,"column":5}},"42":{"start":{"line":126,"column":8},"end":{"line":126,"column":22}},"43":{"start":{"line":127,"column":8},"end":{"line":127,"column":22}},"44":{"start":{"line":128,"column":8},"end":{"line":128,"column":19}},"45":{"start":{"line":129,"column":8},"end":{"line":129,"column":19}},"46":{"start":{"line":131,"column":4},"end":{"line":138,"column":5}},"47":{"start":{"line":132,"column":8},"end":{"line":136,"column":10}},"48":{"start":{"line":137,"column":8},"end":{"line":137,"column":36}},"49":{"start":{"line":139,"column":4},"end":{"line":144,"column":5}},"50":{"start":{"line":140,"column":8},"end":{"line":140,"column":22}},"51":{"start":{"line":141,"column":8},"end":{"line":141,"column":35}},"52":{"start":{"line":142,"column":8},"end":{"line":142,"column":19}},"53":{"start":{"line":143,"column":8},"end":{"line":143,"column":36}},"54":{"start":{"line":146,"column":4},"end":{"line":150,"column":5}},"55":{"start":{"line":147,"column":8},"end":{"line":147,"column":25}},"56":{"start":{"line":148,"column":8},"end":{"line":148,"column":21}},"57":{"start":{"line":149,"column":8},"end":{"line":149,"column":19}},"58":{"start":{"line":151,"column":4},"end":{"line":155,"column":5}},"59":{"start":{"line":152,"column":8},"end":{"line":152,"column":22}},"60":{"start":{"line":153,"column":8},"end":{"line":153,"column":22}},"61":{"start":{"line":154,"column":8},"end":{"line":154,"column":19}},"62":{"start":{"line":156,"column":4},"end":{"line":163,"column":5}},"63":{"start":{"line":157,"column":8},"end":{"line":161,"column":10}},"64":{"start":{"line":162,"column":8},"end":{"line":162,"column":36}},"65":{"start":{"line":165,"column":4},"end":{"line":168,"column":5}},"66":{"start":{"line":166,"column":8},"end":{"line":166,"column":25}},"67":{"start":{"line":167,"column":8},"end":{"line":167,"column":22}},"68":{"start":{"line":170,"column":4},"end":{"line":171,"column":30}},"69":{"start":{"line":171,"column":8},"end":{"line":171,"column":30}},"70":{"start":{"line":174,"column":4},"end":{"line":179,"column":6}},"71":{"start":{"line":181,"column":4},"end":{"line":182,"column":33}},"72":{"start":{"line":182,"column":8},"end":{"line":182,"column":33}},"73":{"start":{"line":184,"column":4},"end":{"line":187,"column":6}},"74":{"start":{"line":190,"column":0},"end":{"line":236,"column":1}},"75":{"start":{"line":191,"column":4},"end":{"line":194,"column":5}},"76":{"start":{"line":192,"column":8},"end":{"line":192,"column":22}},"77":{"start":{"line":193,"column":8},"end":{"line":193,"column":19}},"78":{"start":{"line":196,"column":4},"end":{"line":197,"column":30}},"79":{"start":{"line":197,"column":8},"end":{"line":197,"column":30}},"80":{"start":{"line":199,"column":4},"end":{"line":205,"column":5}},"81":{"start":{"line":200,"column":8},"end":{"line":203,"column":10}},"82":{"start":{"line":204,"column":8},"end":{"line":204,"column":15}},"83":{"start":{"line":207,"column":4},"end":{"line":214,"column":5}},"84":{"start":{"line":208,"column":8},"end":{"line":212,"column":10}},"85":{"start":{"line":213,"column":8},"end":{"line":213,"column":58}},"86":{"start":{"line":216,"column":4},"end":{"line":227,"column":5}},"87":{"start":{"line":217,"column":8},"end":{"line":225,"column":9}},"88":{"start":{"line":218,"column":12},"end":{"line":222,"column":14}},"89":{"start":{"line":223,"column":12},"end":{"line":223,"column":23}},"90":{"start":{"line":224,"column":12},"end":{"line":224,"column":19}},"91":{"start":{"line":226,"column":8},"end":{"line":226,"column":36}},"92":{"start":{"line":229,"column":4},"end":{"line":229,"column":54}},"93":{"start":{"line":230,"column":4},"end":{"line":230,"column":26}},"94":{"start":{"line":231,"column":4},"end":{"line":231,"column":28}},"95":{"start":{"line":233,"column":4},"end":{"line":233,"column":25}},"96":{"start":{"line":235,"column":4},"end":{"line":235,"column":18}},"97":{"start":{"line":238,"column":0},"end":{"line":306,"column":1}},"98":{"start":{"line":239,"column":4},"end":{"line":245,"column":5}},"99":{"start":{"line":240,"column":8},"end":{"line":243,"column":10}},"100":{"start":{"line":244,"column":8},"end":{"line":244,"column":15}},"101":{"start":{"line":246,"column":4},"end":{"line":250,"column":5}},"102":{"start":{"line":247,"column":8},"end":{"line":247,"column":22}},"103":{"start":{"line":248,"column":8},"end":{"line":248,"column":18}},"104":{"start":{"line":249,"column":8},"end":{"line":249,"column":19}},"105":{"start":{"line":251,"column":4},"end":{"line":255,"column":5}},"106":{"start":{"line":252,"column":8},"end":{"line":252,"column":22}},"107":{"start":{"line":253,"column":8},"end":{"line":253,"column":19}},"108":{"start":{"line":254,"column":8},"end":{"line":254,"column":19}},"109":{"start":{"line":256,"column":4},"end":{"line":263,"column":5}},"110":{"start":{"line":257,"column":8},"end":{"line":261,"column":10}},"111":{"start":{"line":262,"column":8},"end":{"line":262,"column":36}},"112":{"start":{"line":265,"column":4},"end":{"line":268,"column":5}},"113":{"start":{"line":266,"column":8},"end":{"line":266,"column":22}},"114":{"start":{"line":267,"column":8},"end":{"line":267,"column":19}},"115":{"start":{"line":269,"column":4},"end":{"line":276,"column":5}},"116":{"start":{"line":270,"column":8},"end":{"line":274,"column":10}},"117":{"start":{"line":275,"column":8},"end":{"line":275,"column":36}},"118":{"start":{"line":278,"column":4},"end":{"line":281,"column":5}},"119":{"start":{"line":279,"column":8},"end":{"line":279,"column":25}},"120":{"start":{"line":280,"column":8},"end":{"line":280,"column":23}},"121":{"start":{"line":282,"column":4},"end":{"line":283,"column":30}},"122":{"start":{"line":283,"column":8},"end":{"line":283,"column":30}},"123":{"start":{"line":285,"column":4},"end":{"line":296,"column":5}},"124":{"start":{"line":286,"column":8},"end":{"line":294,"column":9}},"125":{"start":{"line":287,"column":12},"end":{"line":291,"column":14}},"126":{"start":{"line":292,"column":12},"end":{"line":292,"column":23}},"127":{"start":{"line":293,"column":12},"end":{"line":293,"column":19}},"128":{"start":{"line":295,"column":8},"end":{"line":295,"column":36}},"129":{"start":{"line":298,"column":4},"end":{"line":298,"column":54}},"130":{"start":{"line":299,"column":4},"end":{"line":299,"column":26}},"131":{"start":{"line":300,"column":4},"end":{"line":300,"column":28}},"132":{"start":{"line":301,"column":4},"end":{"line":301,"column":28}},"133":{"start":{"line":303,"column":4},"end":{"line":303,"column":25}},"134":{"start":{"line":305,"column":4},"end":{"line":305,"column":18}},"135":{"start":{"line":308,"column":0},"end":{"line":308,"column":19}}},"branchMap":{"1":{"line":29,"type":"cond-expr","locations":[{"start":{"line":29,"column":40},"end":{"line":29,"column":45}},{"start":{"line":29,"column":48},"end":{"line":29,"column":59}}]},"2":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":4},"end":{"line":57,"column":4}},{"start":{"line":57,"column":4},"end":{"line":57,"column":4}}]},"3":{"line":63,"type":"if","locations":[{"start":{"line":63,"column":8},"end":{"line":63,"column":8}},{"start":{"line":63,"column":8},"end":{"line":63,"column":8}}]},"4":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":4},"end":{"line":75,"column":4}},{"start":{"line":75,"column":4},"end":{"line":75,"column":4}}]},"5":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":81,"column":4}},{"start":{"line":81,"column":4},"end":{"line":81,"column":4}}]},"6":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":8},"end":{"line":82,"column":8}},{"start":{"line":82,"column":8},"end":{"line":82,"column":8}}]},"7":{"line":90,"type":"if","locations":[{"start":{"line":90,"column":4},"end":{"line":90,"column":4}},{"start":{"line":90,"column":4},"end":{"line":90,"column":4}}]},"8":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":4},"end":{"line":94,"column":4}},{"start":{"line":94,"column":4},"end":{"line":94,"column":4}}]},"9":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":4},"end":{"line":103,"column":4}},{"start":{"line":103,"column":4},"end":{"line":103,"column":4}}]},"10":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":4},"end":{"line":119,"column":4}},{"start":{"line":119,"column":4},"end":{"line":119,"column":4}}]},"11":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":4},"end":{"line":125,"column":4}},{"start":{"line":125,"column":4},"end":{"line":125,"column":4}}]},"12":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":131,"column":4}},{"start":{"line":131,"column":4},"end":{"line":131,"column":4}}]},"13":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":4},"end":{"line":139,"column":4}},{"start":{"line":139,"column":4},"end":{"line":139,"column":4}}]},"14":{"line":139,"type":"binary-expr","locations":[{"start":{"line":139,"column":7},"end":{"line":139,"column":33}},{"start":{"line":139,"column":37},"end":{"line":139,"column":63}}]},"15":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":4},"end":{"line":146,"column":4}},{"start":{"line":146,"column":4},"end":{"line":146,"column":4}}]},"16":{"line":151,"type":"if","locations":[{"start":{"line":151,"column":4},"end":{"line":151,"column":4}},{"start":{"line":151,"column":4},"end":{"line":151,"column":4}}]},"17":{"line":156,"type":"if","locations":[{"start":{"line":156,"column":4},"end":{"line":156,"column":4}},{"start":{"line":156,"column":4},"end":{"line":156,"column":4}}]},"18":{"line":165,"type":"if","locations":[{"start":{"line":165,"column":4},"end":{"line":165,"column":4}},{"start":{"line":165,"column":4},"end":{"line":165,"column":4}}]},"19":{"line":170,"type":"if","locations":[{"start":{"line":170,"column":4},"end":{"line":170,"column":4}},{"start":{"line":170,"column":4},"end":{"line":170,"column":4}}]},"20":{"line":181,"type":"if","locations":[{"start":{"line":181,"column":4},"end":{"line":181,"column":4}},{"start":{"line":181,"column":4},"end":{"line":181,"column":4}}]},"21":{"line":191,"type":"if","locations":[{"start":{"line":191,"column":4},"end":{"line":191,"column":4}},{"start":{"line":191,"column":4},"end":{"line":191,"column":4}}]},"22":{"line":196,"type":"if","locations":[{"start":{"line":196,"column":4},"end":{"line":196,"column":4}},{"start":{"line":196,"column":4},"end":{"line":196,"column":4}}]},"23":{"line":199,"type":"if","locations":[{"start":{"line":199,"column":4},"end":{"line":199,"column":4}},{"start":{"line":199,"column":4},"end":{"line":199,"column":4}}]},"24":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":4},"end":{"line":207,"column":4}},{"start":{"line":207,"column":4},"end":{"line":207,"column":4}}]},"25":{"line":216,"type":"if","locations":[{"start":{"line":216,"column":4},"end":{"line":216,"column":4}},{"start":{"line":216,"column":4},"end":{"line":216,"column":4}}]},"26":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":8},"end":{"line":217,"column":8}},{"start":{"line":217,"column":8},"end":{"line":217,"column":8}}]},"27":{"line":239,"type":"if","locations":[{"start":{"line":239,"column":4},"end":{"line":239,"column":4}},{"start":{"line":239,"column":4},"end":{"line":239,"column":4}}]},"28":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":4},"end":{"line":246,"column":4}},{"start":{"line":246,"column":4},"end":{"line":246,"column":4}}]},"29":{"line":251,"type":"if","locations":[{"start":{"line":251,"column":4},"end":{"line":251,"column":4}},{"start":{"line":251,"column":4},"end":{"line":251,"column":4}}]},"30":{"line":256,"type":"if","locations":[{"start":{"line":256,"column":4},"end":{"line":256,"column":4}},{"start":{"line":256,"column":4},"end":{"line":256,"column":4}}]},"31":{"line":265,"type":"if","locations":[{"start":{"line":265,"column":4},"end":{"line":265,"column":4}},{"start":{"line":265,"column":4},"end":{"line":265,"column":4}}]},"32":{"line":269,"type":"if","locations":[{"start":{"line":269,"column":4},"end":{"line":269,"column":4}},{"start":{"line":269,"column":4},"end":{"line":269,"column":4}}]},"33":{"line":278,"type":"if","locations":[{"start":{"line":278,"column":4},"end":{"line":278,"column":4}},{"start":{"line":278,"column":4},"end":{"line":278,"column":4}}]},"34":{"line":282,"type":"if","locations":[{"start":{"line":282,"column":4},"end":{"line":282,"column":4}},{"start":{"line":282,"column":4},"end":{"line":282,"column":4}}]},"35":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":4},"end":{"line":285,"column":4}},{"start":{"line":285,"column":4},"end":{"line":285,"column":4}}]},"36":{"line":286,"type":"if","locations":[{"start":{"line":286,"column":8},"end":{"line":286,"column":8}},{"start":{"line":286,"column":8},"end":{"line":286,"column":8}}]}}},"/home/bmiller/git/node-ipc/lib/eventParser.js":{"path":"/home/bmiller/git/node-ipc/lib/eventParser.js","s":{"1":1,"2":1,"3":14,"4":0,"5":14,"6":0,"7":14,"8":14,"9":1,"10":15,"11":15,"12":15,"13":1,"14":1},"b":{"1":[0,14],"2":[0,14]},"f":{"1":14,"2":15},"fnMap":{"1":{"name":"formatData","line":3,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":28}}},"2":{"name":"parseDataEvents","line":15,"loc":{"start":{"line":15,"column":0},"end":{"line":15,"column":30}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":36}},"2":{"start":{"line":3,"column":0},"end":{"line":13,"column":1}},"3":{"start":{"line":4,"column":4},"end":{"line":6,"column":5}},"4":{"start":{"line":5,"column":8},"end":{"line":5,"column":24}},"5":{"start":{"line":7,"column":4},"end":{"line":9,"column":5}},"6":{"start":{"line":8,"column":8},"end":{"line":8,"column":24}},"7":{"start":{"line":11,"column":4},"end":{"line":11,"column":42}},"8":{"start":{"line":12,"column":4},"end":{"line":12,"column":19}},"9":{"start":{"line":15,"column":0},"end":{"line":19,"column":1}},"10":{"start":{"line":16,"column":4},"end":{"line":16,"column":44}},"11":{"start":{"line":17,"column":4},"end":{"line":17,"column":17}},"12":{"start":{"line":18,"column":4},"end":{"line":18,"column":18}},"13":{"start":{"line":21,"column":0},"end":{"line":25,"column":1}},"14":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":4},"end":{"line":4,"column":4}},{"start":{"line":4,"column":4},"end":{"line":4,"column":4}}]},"2":{"line":7,"type":"if","locations":[{"start":{"line":7,"column":4},"end":{"line":7,"column":4}},{"start":{"line":7,"column":4},"end":{"line":7,"column":4}}]}}},"/home/bmiller/git/node-ipc/lib/client.js":{"path":"/home/bmiller/git/node-ipc/lib/client.js","s":{"1":1,"2":1,"3":8,"4":8,"5":8,"6":1,"7":12,"8":12,"9":12,"10":12,"11":12,"12":0,"13":12,"14":12,"15":1,"16":1,"17":11,"18":1,"19":11,"20":11,"21":1,"22":14,"23":14,"24":14,"25":0,"26":0,"27":14,"28":7,"29":7,"30":7,"31":0,"32":0,"33":0,"34":7,"35":7,"36":7,"37":7,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":14,"53":14,"54":10,"55":10,"56":14,"57":4,"58":4,"59":4,"60":14,"61":14,"62":14,"63":8,"64":8,"65":8,"66":8,"67":8,"68":8,"69":6,"70":6,"71":6,"72":6,"73":6,"74":6,"75":6,"76":6,"77":2,"78":6,"79":14,"80":12,"81":12,"82":0,"83":0,"84":0,"85":0,"86":0,"87":12,"88":12,"89":12,"90":12,"91":0,"92":0,"93":12,"94":12,"95":12,"96":12,"97":12,"98":12,"99":12,"100":12,"101":12,"102":0,"103":12,"104":1},"b":{"1":[8,0],"2":[0,12],"3":[1,11],"4":[0,14],"5":[7,7],"6":[0,7],"7":[7,0],"8":[7,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[8,6],"14":[14,6],"15":[2,4],"16":[0,12],"17":[0,0],"18":[12,0],"19":[0,12],"20":[12,12],"21":[0,12]},"f":{"1":8,"2":12,"3":11,"4":14,"5":10,"6":4,"7":14,"8":6,"9":6,"10":6,"11":12},"fnMap":{"1":{"name":"init","line":9,"loc":{"start":{"line":9,"column":0},"end":{"line":9,"column":25}}},"2":{"name":"emit","line":24,"loc":{"start":{"line":24,"column":0},"end":{"line":24,"column":24}}},"3":{"name":"syncEmit","line":47,"loc":{"start":{"line":47,"column":0},"end":{"line":47,"column":26}}},"4":{"name":"connect","line":52,"loc":{"start":{"line":52,"column":0},"end":{"line":52,"column":18}}},"5":{"name":"(anonymous_5)","line":119,"loc":{"start":{"line":119,"column":8},"end":{"line":119,"column":21}}},"6":{"name":"(anonymous_6)","line":128,"loc":{"start":{"line":128,"column":8},"end":{"line":128,"column":18}}},"7":{"name":"(anonymous_7)","line":137,"loc":{"start":{"line":137,"column":8},"end":{"line":137,"column":18}}},"8":{"name":"(anonymous_8)","line":162,"loc":{"start":{"line":162,"column":20},"end":{"line":162,"column":36}}},"9":{"name":"(anonymous_9)","line":163,"loc":{"start":{"line":163,"column":31},"end":{"line":163,"column":41}}},"10":{"name":"(anonymous_10)","line":168,"loc":{"start":{"line":168,"column":32},"end":{"line":168,"column":42}}},"11":{"name":"(anonymous_11)","line":186,"loc":{"start":{"line":186,"column":8},"end":{"line":186,"column":23}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":7,"column":38}},"2":{"start":{"line":9,"column":0},"end":{"line":22,"column":1}},"3":{"start":{"line":10,"column":4},"end":{"line":18,"column":5}},"4":{"start":{"line":19,"column":4},"end":{"line":19,"column":23}},"5":{"start":{"line":21,"column":4},"end":{"line":21,"column":18}},"6":{"start":{"line":24,"column":0},"end":{"line":45,"column":1}},"7":{"start":{"line":25,"column":4},"end":{"line":25,"column":109}},"8":{"start":{"line":27,"column":4},"end":{"line":27,"column":28}},"9":{"start":{"line":28,"column":4},"end":{"line":28,"column":22}},"10":{"start":{"line":29,"column":4},"end":{"line":29,"column":22}},"11":{"start":{"line":31,"column":4},"end":{"line":35,"column":5}},"12":{"start":{"line":32,"column":8},"end":{"line":32,"column":47}},"13":{"start":{"line":34,"column":8},"end":{"line":34,"column":44}},"14":{"start":{"line":37,"column":4},"end":{"line":40,"column":5}},"15":{"start":{"line":38,"column":8},"end":{"line":38,"column":35}},"16":{"start":{"line":39,"column":8},"end":{"line":39,"column":15}},"17":{"start":{"line":42,"column":4},"end":{"line":44,"column":6}},"18":{"start":{"line":47,"column":0},"end":{"line":50,"column":1}},"19":{"start":{"line":48,"column":4},"end":{"line":48,"column":102}},"20":{"start":{"line":49,"column":4},"end":{"line":49,"column":31}},"21":{"start":{"line":52,"column":0},"end":{"line":233,"column":1}},"22":{"start":{"line":54,"column":4},"end":{"line":54,"column":20}},"23":{"start":{"line":56,"column":4},"end":{"line":56,"column":91}},"24":{"start":{"line":57,"column":4},"end":{"line":60,"column":5}},"25":{"start":{"line":58,"column":8},"end":{"line":58,"column":136}},"26":{"start":{"line":59,"column":8},"end":{"line":59,"column":15}},"27":{"start":{"line":62,"column":4},"end":{"line":113,"column":5}},"28":{"start":{"line":63,"column":8},"end":{"line":63,"column":85}},"29":{"start":{"line":65,"column":8},"end":{"line":65,"column":31}},"30":{"start":{"line":67,"column":8},"end":{"line":71,"column":9}},"31":{"start":{"line":68,"column":12},"end":{"line":68,"column":43}},"32":{"start":{"line":69,"column":12},"end":{"line":69,"column":44}},"33":{"start":{"line":70,"column":12},"end":{"line":70,"column":39}},"34":{"start":{"line":72,"column":8},"end":{"line":76,"column":10}},"35":{"start":{"line":78,"column":8},"end":{"line":112,"column":9}},"36":{"start":{"line":79,"column":12},"end":{"line":79,"column":96}},"37":{"start":{"line":80,"column":12},"end":{"line":85,"column":14}},"38":{"start":{"line":87,"column":12},"end":{"line":87,"column":114}},"39":{"start":{"line":88,"column":12},"end":{"line":90,"column":13}},"40":{"start":{"line":89,"column":16},"end":{"line":89,"column":81}},"41":{"start":{"line":91,"column":12},"end":{"line":93,"column":13}},"42":{"start":{"line":92,"column":16},"end":{"line":92,"column":81}},"43":{"start":{"line":94,"column":12},"end":{"line":104,"column":13}},"44":{"start":{"line":95,"column":16},"end":{"line":97,"column":17}},"45":{"start":{"line":96,"column":20},"end":{"line":96,"column":96}},"46":{"start":{"line":98,"column":16},"end":{"line":98,"column":40}},"47":{"start":{"line":99,"column":16},"end":{"line":103,"column":17}},"48":{"start":{"line":100,"column":20},"end":{"line":102,"column":22}},"49":{"start":{"line":106,"column":12},"end":{"line":106,"column":47}},"50":{"start":{"line":107,"column":12},"end":{"line":107,"column":47}},"51":{"start":{"line":109,"column":12},"end":{"line":111,"column":14}},"52":{"start":{"line":115,"column":4},"end":{"line":115,"column":52}},"53":{"start":{"line":117,"column":4},"end":{"line":124,"column":6}},"54":{"start":{"line":120,"column":12},"end":{"line":120,"column":57}},"55":{"start":{"line":121,"column":12},"end":{"line":121,"column":41}},"56":{"start":{"line":126,"column":4},"end":{"line":133,"column":6}},"57":{"start":{"line":129,"column":12},"end":{"line":129,"column":38}},"58":{"start":{"line":130,"column":12},"end":{"line":130,"column":61}},"59":{"start":{"line":131,"column":12},"end":{"line":131,"column":41}},"60":{"start":{"line":135,"column":4},"end":{"line":182,"column":6}},"61":{"start":{"line":138,"column":12},"end":{"line":138,"column":167}},"62":{"start":{"line":140,"column":12},"end":{"line":156,"column":13}},"63":{"start":{"line":144,"column":16},"end":{"line":144,"column":45}},"64":{"start":{"line":145,"column":16},"end":{"line":149,"column":18}},"65":{"start":{"line":151,"column":16},"end":{"line":151,"column":40}},"66":{"start":{"line":152,"column":16},"end":{"line":152,"column":42}},"67":{"start":{"line":153,"column":16},"end":{"line":153,"column":33}},"68":{"start":{"line":155,"column":16},"end":{"line":155,"column":23}},"69":{"start":{"line":158,"column":12},"end":{"line":158,"column":35}},"70":{"start":{"line":160,"column":12},"end":{"line":178,"column":14}},"71":{"start":{"line":163,"column":24},"end":{"line":174,"column":25}},"72":{"start":{"line":164,"column":28},"end":{"line":164,"column":54}},"73":{"start":{"line":165,"column":28},"end":{"line":165,"column":52}},"74":{"start":{"line":166,"column":28},"end":{"line":166,"column":45}},"75":{"start":{"line":167,"column":28},"end":{"line":173,"column":29}},"76":{"start":{"line":169,"column":36},"end":{"line":170,"column":89}},"77":{"start":{"line":170,"column":40},"end":{"line":170,"column":89}},"78":{"start":{"line":180,"column":12},"end":{"line":180,"column":41}},"79":{"start":{"line":184,"column":4},"end":{"line":232,"column":6}},"80":{"start":{"line":187,"column":12},"end":{"line":187,"column":56}},"81":{"start":{"line":188,"column":12},"end":{"line":199,"column":13}},"82":{"start":{"line":189,"column":16},"end":{"line":192,"column":18}},"83":{"start":{"line":193,"column":16},"end":{"line":195,"column":17}},"84":{"start":{"line":194,"column":20},"end":{"line":194,"column":27}},"85":{"start":{"line":197,"column":16},"end":{"line":197,"column":36}},"86":{"start":{"line":198,"column":16},"end":{"line":198,"column":23}},"87":{"start":{"line":201,"column":12},"end":{"line":202,"column":34}},"88":{"start":{"line":202,"column":16},"end":{"line":202,"column":34}},"89":{"start":{"line":204,"column":12},"end":{"line":204,"column":40}},"90":{"start":{"line":206,"column":12},"end":{"line":209,"column":13}},"91":{"start":{"line":207,"column":16},"end":{"line":207,"column":131}},"92":{"start":{"line":208,"column":16},"end":{"line":208,"column":23}},"93":{"start":{"line":211,"column":12},"end":{"line":211,"column":30}},"94":{"start":{"line":213,"column":12},"end":{"line":213,"column":49}},"95":{"start":{"line":214,"column":12},"end":{"line":214,"column":39}},"96":{"start":{"line":215,"column":12},"end":{"line":224,"column":13}},"97":{"start":{"line":216,"column":16},"end":{"line":216,"column":40}},"98":{"start":{"line":217,"column":16},"end":{"line":217,"column":40}},"99":{"start":{"line":219,"column":16},"end":{"line":219,"column":94}},"100":{"start":{"line":220,"column":16},"end":{"line":223,"column":18}},"101":{"start":{"line":226,"column":12},"end":{"line":228,"column":13}},"102":{"start":{"line":227,"column":16},"end":{"line":227,"column":23}},"103":{"start":{"line":230,"column":12},"end":{"line":230,"column":32}},"104":{"start":{"line":235,"column":0},"end":{"line":235,"column":20}}},"branchMap":{"1":{"line":17,"type":"binary-expr","locations":[{"start":{"line":17,"column":25},"end":{"line":17,"column":42}},{"start":{"line":17,"column":44},"end":{"line":17,"column":45}}]},"2":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":4},"end":{"line":31,"column":4}},{"start":{"line":31,"column":4},"end":{"line":31,"column":4}}]},"3":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":4},"end":{"line":37,"column":4}},{"start":{"line":37,"column":4},"end":{"line":37,"column":4}}]},"4":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":4},"end":{"line":57,"column":4}},{"start":{"line":57,"column":4},"end":{"line":57,"column":4}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":4},"end":{"line":62,"column":4}},{"start":{"line":62,"column":4},"end":{"line":62,"column":4}}]},"6":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":8},"end":{"line":67,"column":8}},{"start":{"line":67,"column":8},"end":{"line":67,"column":8}}]},"7":{"line":67,"type":"binary-expr","locations":[{"start":{"line":67,"column":12},"end":{"line":67,"column":39}},{"start":{"line":67,"column":43},"end":{"line":67,"column":83}}]},"8":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":8},"end":{"line":78,"column":8}},{"start":{"line":78,"column":8},"end":{"line":78,"column":8}}]},"9":{"line":88,"type":"if","locations":[{"start":{"line":88,"column":12},"end":{"line":88,"column":12}},{"start":{"line":88,"column":12},"end":{"line":88,"column":12}}]},"10":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":12},"end":{"line":91,"column":12}},{"start":{"line":91,"column":12},"end":{"line":91,"column":12}}]},"11":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":94,"column":12}},{"start":{"line":94,"column":12},"end":{"line":94,"column":12}}]},"12":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":16},"end":{"line":95,"column":16}},{"start":{"line":95,"column":16},"end":{"line":95,"column":16}}]},"13":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":12},"end":{"line":140,"column":12}},{"start":{"line":140,"column":12},"end":{"line":140,"column":12}}]},"14":{"line":141,"type":"binary-expr","locations":[{"start":{"line":141,"column":16},"end":{"line":141,"column":42}},{"start":{"line":141,"column":46},"end":{"line":141,"column":71}}]},"15":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":36},"end":{"line":169,"column":36}},{"start":{"line":169,"column":36},"end":{"line":169,"column":36}}]},"16":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":12},"end":{"line":188,"column":12}},{"start":{"line":188,"column":12},"end":{"line":188,"column":12}}]},"17":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":16},"end":{"line":193,"column":16}},{"start":{"line":193,"column":16},"end":{"line":193,"column":16}}]},"18":{"line":201,"type":"if","locations":[{"start":{"line":201,"column":12},"end":{"line":201,"column":12}},{"start":{"line":201,"column":12},"end":{"line":201,"column":12}}]},"19":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":12},"end":{"line":206,"column":12}},{"start":{"line":206,"column":12},"end":{"line":206,"column":12}}]},"20":{"line":206,"type":"binary-expr","locations":[{"start":{"line":206,"column":15},"end":{"line":206,"column":52}},{"start":{"line":206,"column":56},"end":{"line":206,"column":97}}]},"21":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":12},"end":{"line":226,"column":12}},{"start":{"line":226,"column":12},"end":{"line":226,"column":12}}]}}},"/home/bmiller/git/node-ipc/lib/socketServer.js":{"path":"/home/bmiller/git/node-ipc/lib/socketServer.js","s":{"1":1,"2":1,"3":2,"4":2,"5":2,"6":2,"7":2,"8":0,"9":2,"10":2,"11":2,"12":0,"13":0,"14":0,"15":2,"16":2,"17":0,"18":1,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":1,"32":4,"33":4,"34":0,"35":4,"36":0,"37":0,"38":4,"39":4,"40":4,"41":4,"42":2,"43":2,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":1,"61":2,"62":2,"63":2,"64":1,"65":1,"66":0,"67":2,"68":2,"69":2,"70":2,"71":4,"72":0,"73":0,"74":4,"75":1,"76":4,"77":4,"78":2,"79":4,"80":4,"81":0,"82":4,"83":0,"84":0,"85":4,"86":3,"87":3,"88":0,"89":0,"90":0,"91":3,"92":3,"93":3,"94":3,"95":0,"96":0,"97":3,"98":3,"99":3,"100":3,"101":3,"102":3,"103":3,"104":3,"105":3,"106":4,"107":1,"108":0,"109":1,"110":1,"111":1,"112":0,"113":1,"114":1,"115":4,"116":4,"117":0,"118":1,"119":4,"120":4,"121":1,"122":1,"123":0,"124":0,"125":0,"126":1,"127":1,"128":3,"129":1,"130":1,"131":1,"132":2,"133":2,"134":2,"135":4,"136":4,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":4,"152":1},"b":{"1":[0,2],"2":[2,0],"3":[2,1],"4":[0,2],"5":[2,2],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,4],"11":[3,1],"12":[2,2],"13":[4,3],"14":[2,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[1,1],"21":[1,1],"22":[2,2],"23":[1,2],"24":[3,2],"25":[0,3],"26":[3,0],"27":[0,3],"28":[3,3],"29":[3,0],"30":[0,1],"31":[0,1],"32":[0,4],"33":[1,3],"34":[0,1],"35":[1,2],"36":[3,2],"37":[0,1],"38":[1,1],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0]},"f":{"1":2,"2":0,"3":4,"4":4,"5":0,"6":4,"7":4,"8":4,"9":2,"10":2,"11":0,"12":2,"13":0,"14":4,"15":0,"16":0,"17":3,"18":1,"19":4,"20":0},"fnMap":{"1":{"name":"emit","line":9,"loc":{"start":{"line":9,"column":0},"end":{"line":9,"column":33}}},"2":{"name":"broadcast","line":40,"loc":{"start":{"line":40,"column":0},"end":{"line":40,"column":29}}},"3":{"name":"init","line":63,"loc":{"start":{"line":63,"column":0},"end":{"line":63,"column":35}}},"4":{"name":"(anonymous_4)","line":75,"loc":{"start":{"line":75,"column":26},"end":{"line":75,"column":42}}},"5":{"name":"(anonymous_5)","line":81,"loc":{"start":{"line":81,"column":13},"end":{"line":81,"column":23}}},"6":{"name":"(anonymous_6)","line":84,"loc":{"start":{"line":84,"column":26},"end":{"line":84,"column":36}}},"7":{"name":"(anonymous_7)","line":93,"loc":{"start":{"line":93,"column":20},"end":{"line":93,"column":36}}},"8":{"name":"(anonymous_8)","line":94,"loc":{"start":{"line":94,"column":31},"end":{"line":94,"column":43}}},"9":{"name":"UDPWrite","line":134,"loc":{"start":{"line":134,"column":32},"end":{"line":134,"column":65}}},"10":{"name":"(anonymous_10)","line":142,"loc":{"start":{"line":142,"column":40},"end":{"line":142,"column":61}}},"11":{"name":"(anonymous_11)","line":147,"loc":{"start":{"line":147,"column":52},"end":{"line":147,"column":65}}},"12":{"name":"(anonymous_12)","line":162,"loc":{"start":{"line":162,"column":36},"end":{"line":162,"column":48}}},"13":{"name":"(anonymous_13)","line":170,"loc":{"start":{"line":170,"column":32},"end":{"line":170,"column":45}}},"14":{"name":"serverCreated","line":182,"loc":{"start":{"line":182,"column":28},"end":{"line":182,"column":59}}},"15":{"name":"(anonymous_15)","line":191,"loc":{"start":{"line":191,"column":36},"end":{"line":191,"column":52}}},"16":{"name":"(anonymous_16)","line":201,"loc":{"start":{"line":201,"column":36},"end":{"line":201,"column":49}}},"17":{"name":"(anonymous_17)","line":210,"loc":{"start":{"line":210,"column":36},"end":{"line":210,"column":60}}},"18":{"name":"(anonymous_18)","line":256,"loc":{"start":{"line":256,"column":36},"end":{"line":256,"column":56}}},"19":{"name":"started","line":281,"loc":{"start":{"line":281,"column":28},"end":{"line":281,"column":52}}},"20":{"name":"(anonymous_20)","line":334,"loc":{"start":{"line":334,"column":8},"end":{"line":334,"column":18}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":7,"column":36}},"2":{"start":{"line":9,"column":0},"end":{"line":38,"column":1}},"3":{"start":{"line":10,"column":4},"end":{"line":10,"column":74}},"4":{"start":{"line":12,"column":4},"end":{"line":12,"column":28}},"5":{"start":{"line":13,"column":4},"end":{"line":13,"column":22}},"6":{"start":{"line":14,"column":4},"end":{"line":14,"column":22}},"7":{"start":{"line":16,"column":4},"end":{"line":20,"column":5}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":47}},"9":{"start":{"line":19,"column":8},"end":{"line":19,"column":44}},"10":{"start":{"line":22,"column":4},"end":{"line":35,"column":5}},"11":{"start":{"line":24,"column":8},"end":{"line":28,"column":9}},"12":{"start":{"line":25,"column":12},"end":{"line":25,"column":166}},"13":{"start":{"line":26,"column":12},"end":{"line":26,"column":38}},"14":{"start":{"line":27,"column":12},"end":{"line":27,"column":19}},"15":{"start":{"line":30,"column":8},"end":{"line":33,"column":10}},"16":{"start":{"line":34,"column":8},"end":{"line":34,"column":15}},"17":{"start":{"line":37,"column":4},"end":{"line":37,"column":26}},"18":{"start":{"line":40,"column":0},"end":{"line":61,"column":1}},"19":{"start":{"line":41,"column":4},"end":{"line":41,"column":143}},"20":{"start":{"line":42,"column":4},"end":{"line":42,"column":28}},"21":{"start":{"line":43,"column":4},"end":{"line":43,"column":22}},"22":{"start":{"line":44,"column":4},"end":{"line":44,"column":22}},"23":{"start":{"line":46,"column":4},"end":{"line":50,"column":5}},"24":{"start":{"line":47,"column":8},"end":{"line":47,"column":47}},"25":{"start":{"line":49,"column":8},"end":{"line":49,"column":44}},"26":{"start":{"line":52,"column":4},"end":{"line":60,"column":5}},"27":{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},"28":{"start":{"line":54,"column":12},"end":{"line":54,"column":55}},"29":{"start":{"line":57,"column":8},"end":{"line":59,"column":9}},"30":{"start":{"line":58,"column":12},"end":{"line":58,"column":43}},"31":{"start":{"line":63,"column":0},"end":{"line":362,"column":1}},"32":{"start":{"line":64,"column":4},"end":{"line":328,"column":6}},"33":{"start":{"line":76,"column":12},"end":{"line":79,"column":14}},"34":{"start":{"line":82,"column":12},"end":{"line":82,"column":34}},"35":{"start":{"line":85,"column":12},"end":{"line":88,"column":13}},"36":{"start":{"line":86,"column":16},"end":{"line":86,"column":87}},"37":{"start":{"line":87,"column":16},"end":{"line":87,"column":23}},"38":{"start":{"line":90,"column":12},"end":{"line":326,"column":14}},"39":{"start":{"line":94,"column":24},"end":{"line":323,"column":25}},"40":{"start":{"line":95,"column":28},"end":{"line":95,"column":133}},"41":{"start":{"line":97,"column":28},"end":{"line":166,"column":29}},"42":{"start":{"line":98,"column":32},"end":{"line":132,"column":33}},"43":{"start":{"line":99,"column":36},"end":{"line":101,"column":38}},"44":{"start":{"line":103,"column":36},"end":{"line":103,"column":94}},"45":{"start":{"line":104,"column":36},"end":{"line":108,"column":37}},"46":{"start":{"line":105,"column":40},"end":{"line":105,"column":105}},"47":{"start":{"line":107,"column":40},"end":{"line":107,"column":135}},"48":{"start":{"line":109,"column":36},"end":{"line":113,"column":37}},"49":{"start":{"line":110,"column":40},"end":{"line":110,"column":105}},"50":{"start":{"line":112,"column":40},"end":{"line":112,"column":128}},"51":{"start":{"line":114,"column":36},"end":{"line":116,"column":37}},"52":{"start":{"line":115,"column":40},"end":{"line":115,"column":109}},"53":{"start":{"line":117,"column":36},"end":{"line":127,"column":37}},"54":{"start":{"line":118,"column":40},"end":{"line":120,"column":41}},"55":{"start":{"line":119,"column":44},"end":{"line":119,"column":120}},"56":{"start":{"line":121,"column":40},"end":{"line":121,"column":64}},"57":{"start":{"line":122,"column":40},"end":{"line":126,"column":41}},"58":{"start":{"line":123,"column":44},"end":{"line":125,"column":46}},"59":{"start":{"line":128,"column":36},"end":{"line":131,"column":38}},"60":{"start":{"line":134,"column":32},"end":{"line":154,"column":33}},"61":{"start":{"line":135,"column":36},"end":{"line":135,"column":89}},"62":{"start":{"line":136,"column":36},"end":{"line":153,"column":38}},"63":{"start":{"line":143,"column":44},"end":{"line":151,"column":45}},"64":{"start":{"line":144,"column":48},"end":{"line":144,"column":100}},"65":{"start":{"line":145,"column":48},"end":{"line":150,"column":50}},"66":{"start":{"line":148,"column":56},"end":{"line":148,"column":84}},"67":{"start":{"line":156,"column":32},"end":{"line":158,"column":34}},"68":{"start":{"line":159,"column":32},"end":{"line":159,"column":61}},"69":{"start":{"line":160,"column":32},"end":{"line":165,"column":34}},"70":{"start":{"line":163,"column":40},"end":{"line":163,"column":68}},"71":{"start":{"line":168,"column":28},"end":{"line":178,"column":30}},"72":{"start":{"line":171,"column":36},"end":{"line":171,"column":72}},"73":{"start":{"line":173,"column":36},"end":{"line":176,"column":37}},"74":{"start":{"line":180,"column":28},"end":{"line":180,"column":86}},"75":{"start":{"line":182,"column":28},"end":{"line":279,"column":29}},"76":{"start":{"line":183,"column":32},"end":{"line":183,"column":60}},"77":{"start":{"line":185,"column":32},"end":{"line":186,"column":79}},"78":{"start":{"line":186,"column":36},"end":{"line":186,"column":79}},"79":{"start":{"line":188,"column":32},"end":{"line":188,"column":97}},"80":{"start":{"line":189,"column":32},"end":{"line":197,"column":34}},"81":{"start":{"line":192,"column":40},"end":{"line":195,"column":42}},"82":{"start":{"line":199,"column":32},"end":{"line":206,"column":34}},"83":{"start":{"line":202,"column":40},"end":{"line":202,"column":83}},"84":{"start":{"line":204,"column":40},"end":{"line":204,"column":68}},"85":{"start":{"line":208,"column":32},"end":{"line":252,"column":34}},"86":{"start":{"line":211,"column":40},"end":{"line":211,"column":100}},"87":{"start":{"line":212,"column":40},"end":{"line":220,"column":41}},"88":{"start":{"line":213,"column":44},"end":{"line":213,"column":80}},"89":{"start":{"line":214,"column":44},"end":{"line":218,"column":46}},"90":{"start":{"line":219,"column":44},"end":{"line":219,"column":51}},"91":{"start":{"line":222,"column":40},"end":{"line":223,"column":62}},"92":{"start":{"line":223,"column":44},"end":{"line":223,"column":62}},"93":{"start":{"line":225,"column":40},"end":{"line":225,"column":68}},"94":{"start":{"line":227,"column":40},"end":{"line":230,"column":41}},"95":{"start":{"line":228,"column":44},"end":{"line":228,"column":159}},"96":{"start":{"line":229,"column":44},"end":{"line":229,"column":51}},"97":{"start":{"line":232,"column":40},"end":{"line":232,"column":58}},"98":{"start":{"line":234,"column":40},"end":{"line":234,"column":69}},"99":{"start":{"line":236,"column":40},"end":{"line":250,"column":41}},"100":{"start":{"line":237,"column":44},"end":{"line":237,"column":68}},"101":{"start":{"line":238,"column":44},"end":{"line":238,"column":71}},"102":{"start":{"line":240,"column":44},"end":{"line":240,"column":116}},"103":{"start":{"line":242,"column":44},"end":{"line":243,"column":72}},"104":{"start":{"line":243,"column":48},"end":{"line":243,"column":72}},"105":{"start":{"line":245,"column":44},"end":{"line":249,"column":46}},"106":{"start":{"line":254,"column":32},"end":{"line":269,"column":34}},"107":{"start":{"line":257,"column":40},"end":{"line":258,"column":51}},"108":{"start":{"line":258,"column":44},"end":{"line":258,"column":51}},"109":{"start":{"line":259,"column":40},"end":{"line":259,"column":123}},"110":{"start":{"line":260,"column":40},"end":{"line":260,"column":49}},"111":{"start":{"line":262,"column":40},"end":{"line":266,"column":41}},"112":{"start":{"line":263,"column":44},"end":{"line":263,"column":79}},"113":{"start":{"line":265,"column":44},"end":{"line":265,"column":64}},"114":{"start":{"line":267,"column":40},"end":{"line":267,"column":71}},"115":{"start":{"line":271,"column":32},"end":{"line":274,"column":34}},"116":{"start":{"line":276,"column":32},"end":{"line":278,"column":33}},"117":{"start":{"line":277,"column":36},"end":{"line":277,"column":43}},"118":{"start":{"line":281,"column":28},"end":{"line":283,"column":29}},"119":{"start":{"line":282,"column":32},"end":{"line":282,"column":54}},"120":{"start":{"line":285,"column":28},"end":{"line":299,"column":29}},"121":{"start":{"line":286,"column":32},"end":{"line":286,"column":106}},"122":{"start":{"line":287,"column":32},"end":{"line":291,"column":15}},"123":{"start":{"line":288,"column":18},"end":{"line":288,"column":63}},"124":{"start":{"line":289,"column":18},"end":{"line":289,"column":64}},"125":{"start":{"line":290,"column":18},"end":{"line":290,"column":59}},"126":{"start":{"line":293,"column":32},"end":{"line":296,"column":34}},"127":{"start":{"line":298,"column":32},"end":{"line":298,"column":39}},"128":{"start":{"line":301,"column":28},"end":{"line":309,"column":29}},"129":{"start":{"line":302,"column":32},"end":{"line":302,"column":113}},"130":{"start":{"line":303,"column":32},"end":{"line":307,"column":34}},"131":{"start":{"line":308,"column":32},"end":{"line":308,"column":39}},"132":{"start":{"line":311,"column":28},"end":{"line":311,"column":107}},"133":{"start":{"line":312,"column":28},"end":{"line":315,"column":30}},"134":{"start":{"line":317,"column":28},"end":{"line":322,"column":30}},"135":{"start":{"line":330,"column":4},"end":{"line":330,"column":23}},"136":{"start":{"line":332,"column":4},"end":{"line":359,"column":6}},"137":{"start":{"line":335,"column":12},"end":{"line":357,"column":13}},"138":{"start":{"line":336,"column":16},"end":{"line":336,"column":45}},"139":{"start":{"line":337,"column":16},"end":{"line":337,"column":44}},"140":{"start":{"line":339,"column":16},"end":{"line":342,"column":17}},"141":{"start":{"line":340,"column":20},"end":{"line":341,"column":33}},"142":{"start":{"line":341,"column":24},"end":{"line":341,"column":33}},"143":{"start":{"line":344,"column":16},"end":{"line":345,"column":47}},"144":{"start":{"line":345,"column":19},"end":{"line":345,"column":47}},"145":{"start":{"line":347,"column":16},"end":{"line":347,"column":88}},"146":{"start":{"line":349,"column":16},"end":{"line":350,"column":37}},"147":{"start":{"line":350,"column":20},"end":{"line":350,"column":37}},"148":{"start":{"line":352,"column":16},"end":{"line":352,"column":43}},"149":{"start":{"line":354,"column":16},"end":{"line":354,"column":81}},"150":{"start":{"line":356,"column":16},"end":{"line":356,"column":23}},"151":{"start":{"line":361,"column":4},"end":{"line":361,"column":18}},"152":{"start":{"line":364,"column":0},"end":{"line":364,"column":20}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":4}},{"start":{"line":16,"column":4},"end":{"line":16,"column":4}}]},"2":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":4},"end":{"line":22,"column":4}},{"start":{"line":22,"column":4},"end":{"line":22,"column":4}}]},"3":{"line":22,"type":"binary-expr","locations":[{"start":{"line":22,"column":7},"end":{"line":22,"column":16}},{"start":{"line":22,"column":20},"end":{"line":22,"column":29}}]},"4":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":8},"end":{"line":24,"column":8}},{"start":{"line":24,"column":8},"end":{"line":24,"column":8}}]},"5":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":11},"end":{"line":24,"column":26}},{"start":{"line":24,"column":30},"end":{"line":24,"column":42}}]},"6":{"line":41,"type":"cond-expr","locations":[{"start":{"line":41,"column":115},"end":{"line":41,"column":124}},{"start":{"line":41,"column":125},"end":{"line":41,"column":127}}]},"7":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":46,"column":4}},{"start":{"line":46,"column":4},"end":{"line":46,"column":4}}]},"8":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":4},"end":{"line":52,"column":4}},{"start":{"line":52,"column":4},"end":{"line":52,"column":4}}]},"9":{"line":52,"type":"binary-expr","locations":[{"start":{"line":52,"column":7},"end":{"line":52,"column":16}},{"start":{"line":52,"column":20},"end":{"line":52,"column":29}}]},"10":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":12},"end":{"line":85,"column":12}},{"start":{"line":85,"column":12},"end":{"line":85,"column":12}}]},"11":{"line":95,"type":"cond-expr","locations":[{"start":{"line":95,"column":103},"end":{"line":95,"column":118}},{"start":{"line":95,"column":119},"end":{"line":95,"column":121}}]},"12":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":28},"end":{"line":97,"column":28}},{"start":{"line":97,"column":28},"end":{"line":97,"column":28}}]},"13":{"line":97,"type":"binary-expr","locations":[{"start":{"line":97,"column":31},"end":{"line":97,"column":43}},{"start":{"line":97,"column":47},"end":{"line":97,"column":59}}]},"14":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":32},"end":{"line":98,"column":32}},{"start":{"line":98,"column":32},"end":{"line":98,"column":32}}]},"15":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":36},"end":{"line":104,"column":36}},{"start":{"line":104,"column":36},"end":{"line":104,"column":36}}]},"16":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":36},"end":{"line":109,"column":36}},{"start":{"line":109,"column":36},"end":{"line":109,"column":36}}]},"17":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":36},"end":{"line":114,"column":36}},{"start":{"line":114,"column":36},"end":{"line":114,"column":36}}]},"18":{"line":117,"type":"if","locations":[{"start":{"line":117,"column":36},"end":{"line":117,"column":36}},{"start":{"line":117,"column":36},"end":{"line":117,"column":36}}]},"19":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":40},"end":{"line":118,"column":40}},{"start":{"line":118,"column":40},"end":{"line":118,"column":40}}]},"20":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":44},"end":{"line":143,"column":44}},{"start":{"line":143,"column":44},"end":{"line":143,"column":44}}]},"21":{"line":157,"type":"cond-expr","locations":[{"start":{"line":157,"column":52},"end":{"line":157,"column":58}},{"start":{"line":157,"column":59},"end":{"line":157,"column":65}}]},"22":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":32},"end":{"line":185,"column":32}},{"start":{"line":185,"column":32},"end":{"line":185,"column":32}}]},"23":{"line":211,"type":"cond-expr","locations":[{"start":{"line":211,"column":80},"end":{"line":211,"column":89}},{"start":{"line":211,"column":92},"end":{"line":211,"column":98}}]},"24":{"line":211,"type":"binary-expr","locations":[{"start":{"line":211,"column":51},"end":{"line":211,"column":62}},{"start":{"line":211,"column":66},"end":{"line":211,"column":77}}]},"25":{"line":212,"type":"if","locations":[{"start":{"line":212,"column":40},"end":{"line":212,"column":40}},{"start":{"line":212,"column":40},"end":{"line":212,"column":40}}]},"26":{"line":222,"type":"if","locations":[{"start":{"line":222,"column":40},"end":{"line":222,"column":40}},{"start":{"line":222,"column":40},"end":{"line":222,"column":40}}]},"27":{"line":227,"type":"if","locations":[{"start":{"line":227,"column":40},"end":{"line":227,"column":40}},{"start":{"line":227,"column":40},"end":{"line":227,"column":40}}]},"28":{"line":227,"type":"binary-expr","locations":[{"start":{"line":227,"column":43},"end":{"line":227,"column":80}},{"start":{"line":227,"column":84},"end":{"line":227,"column":125}}]},"29":{"line":242,"type":"if","locations":[{"start":{"line":242,"column":44},"end":{"line":242,"column":44}},{"start":{"line":242,"column":44},"end":{"line":242,"column":44}}]},"30":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":40},"end":{"line":257,"column":40}},{"start":{"line":257,"column":40},"end":{"line":257,"column":40}}]},"31":{"line":262,"type":"if","locations":[{"start":{"line":262,"column":40},"end":{"line":262,"column":40}},{"start":{"line":262,"column":40},"end":{"line":262,"column":40}}]},"32":{"line":276,"type":"if","locations":[{"start":{"line":276,"column":32},"end":{"line":276,"column":32}},{"start":{"line":276,"column":32},"end":{"line":276,"column":32}}]},"33":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":28},"end":{"line":285,"column":28}},{"start":{"line":285,"column":28},"end":{"line":285,"column":28}}]},"34":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":32},"end":{"line":287,"column":32}},{"start":{"line":287,"column":32},"end":{"line":287,"column":32}}]},"35":{"line":301,"type":"if","locations":[{"start":{"line":301,"column":28},"end":{"line":301,"column":28}},{"start":{"line":301,"column":28},"end":{"line":301,"column":28}}]},"36":{"line":301,"type":"binary-expr","locations":[{"start":{"line":301,"column":31},"end":{"line":301,"column":43}},{"start":{"line":301,"column":47},"end":{"line":301,"column":59}}]},"37":{"line":302,"type":"cond-expr","locations":[{"start":{"line":302,"column":90},"end":{"line":302,"column":95}},{"start":{"line":302,"column":96},"end":{"line":302,"column":101}}]},"38":{"line":311,"type":"cond-expr","locations":[{"start":{"line":311,"column":82},"end":{"line":311,"column":88}},{"start":{"line":311,"column":89},"end":{"line":311,"column":95}}]},"39":{"line":339,"type":"if","locations":[{"start":{"line":339,"column":16},"end":{"line":339,"column":16}},{"start":{"line":339,"column":16},"end":{"line":339,"column":16}}]},"40":{"line":340,"type":"if","locations":[{"start":{"line":340,"column":20},"end":{"line":340,"column":20}},{"start":{"line":340,"column":20},"end":{"line":340,"column":20}}]},"41":{"line":344,"type":"if","locations":[{"start":{"line":344,"column":16},"end":{"line":344,"column":16}},{"start":{"line":344,"column":16},"end":{"line":344,"column":16}}]},"42":{"line":349,"type":"if","locations":[{"start":{"line":349,"column":16},"end":{"line":349,"column":16}},{"start":{"line":349,"column":16},"end":{"line":349,"column":16}}]}}}}
\ No newline at end of file
diff --git a/spec/coverage/lcov-report/base.css b/spec/coverage/lcov-report/base.css
new file mode 100644
index 0000000..0c0571d
--- /dev/null
+++ b/spec/coverage/lcov-report/base.css
@@ -0,0 +1,212 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px;; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+
+
+.medium .chart { border:1px solid #666; }
+.medium .cover-fill { background: #666; }
+
+.cbranch-no { background: yellow !important; color: #111; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+.medium { background: #eaeaea; }
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/spec/coverage/lcov-report/index.html b/spec/coverage/lcov-report/index.html
new file mode 100644
index 0000000..cbaa0d4
--- /dev/null
+++ b/spec/coverage/lcov-report/index.html
@@ -0,0 +1,106 @@
+
+
+
+ Code coverage report for All files
+
+
+
+
+
+
+
+
+
+
+ /
+
+
+
+ 66.17%
+ Statements
+ 268/405
+
+
+ 55.45%
+ Branches
+ 112/202
+
+
+ 74.42%
+ Functions
+ 32/43
+
+
+ 66.17%
+ Lines
+ 268/405
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ node-ipc/ |
+ |
+ 70.37% |
+ 95/135 |
+ 61.11% |
+ 44/72 |
+ 60% |
+ 6/10 |
+ 70.37% |
+ 95/135 |
+
+
+
+ node-ipc/lib/ |
+ |
+ 64.07% |
+ 173/270 |
+ 52.31% |
+ 68/130 |
+ 78.79% |
+ 26/33 |
+ 64.07% |
+ 173/270 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/index.html b/spec/coverage/lcov-report/node-ipc/index.html
new file mode 100644
index 0000000..44e4765
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for node-ipc/
+
+
+
+
+
+
+
+
+
+
+
+
+ 70.37%
+ Statements
+ 95/135
+
+
+ 61.11%
+ Branches
+ 44/72
+
+
+ 60%
+ Functions
+ 6/10
+
+
+ 70.37%
+ Lines
+ 95/135
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ node-ipc.js |
+ |
+ 70.37% |
+ 95/135 |
+ 61.11% |
+ 44/72 |
+ 60% |
+ 6/10 |
+ 70.37% |
+ 95/135 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/lib/client.js.html b/spec/coverage/lcov-report/node-ipc/lib/client.js.html
new file mode 100644
index 0000000..d31b150
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/lib/client.js.html
@@ -0,0 +1,770 @@
+
+
+
+ Code coverage report for node-ipc/lib/client.js
+
+
+
+
+
+
+
+
+
+
+
+
+ 73.08%
+ Statements
+ 76/104
+
+
+ 52.38%
+ Branches
+ 22/42
+
+
+ 100%
+ Functions
+ 11/11
+
+
+ 73.08%
+ Lines
+ 76/104
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+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
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236 | 1×
+
+
+
+
+
+
+
+1×
+8×
+
+
+
+
+
+
+
+
+8×
+
+8×
+
+
+1×
+12×
+
+12×
+12×
+12×
+
+12×
+
+
+12×
+
+
+12×
+1×
+1×
+
+
+11×
+
+
+
+
+1×
+11×
+11×
+
+
+1×
+
+14×
+
+14×
+14×
+
+
+
+
+14×
+7×
+
+7×
+
+7×
+
+
+
+
+7×
+
+
+
+
+
+7×
+7×
+7×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+14×
+
+14×
+
+
+10×
+10×
+
+
+
+
+14×
+
+
+4×
+4×
+4×
+
+
+
+14×
+
+
+14×
+
+14×
+
+
+
+8×
+8×
+
+
+
+
+
+8×
+8×
+8×
+
+8×
+
+
+6×
+
+6×
+
+
+6×
+6×
+6×
+6×
+6×
+
+6×
+2×
+
+
+
+
+
+
+
+
+
+6×
+
+
+
+14×
+
+
+12×
+12×
+
+
+
+
+
+
+
+
+
+
+
+
+12×
+12×
+
+12×
+
+12×
+
+
+
+
+12×
+
+12×
+12×
+12×
+12×
+12×
+
+12×
+12×
+
+
+
+
+
+12×
+
+
+
+12×
+
+
+
+
+1×
+ | var net = require('net'),
+ tls = require('tls'),
+ eventParser = require('../lib/eventParser.js'),
+ pubsub = require('event-pubsub'),
+ Message = require('js-message'),
+ fs = require('fs'),
+ Queue = require('js-queue');
+
+function init(config,log){
+ var client={
+ config : config,
+ queue : new Queue,
+ socket : false,
+ connect : connect,
+ emit : emit,
+ log : log,
+ retriesRemaining:config.maxRetries||0
+ }
+ new pubsub(client);
+
+ return client;
+}
+
+function emit(type,data){
+ this.log('dispatching event to '.debug, this.id.variable, this.path.variable,' : ', type.data,',', data);
+
+ var message=new Message;
+ message.type=type;
+ message.data=data;
+
+ Iif(this.config.rawBuffer){
+ message=new Buffer(type,this.encoding);
+ }else{
+ message=eventParser.format(message);
+ }
+
+ if(!this.config.sync){
+ this.socket.write(message);
+ return;
+ }
+
+ this.queue.add(
+ syncEmit.bind(this,message)
+ );
+};
+
+function syncEmit(message){
+ this.log('dispatching event to '.debug, this.id.variable, this.path.variable,' : ', message.data);
+ this.socket.write(message);
+}
+
+function connect(){
+ //init client object for scope persistance especially inside of socket events.
+ var client=this;
+
+ client.log('requested connection to '.debug, client.id.variable, client.path.variable);
+ Iif(!this.path){
+ client.log('\n\n######\nerror: '.error, client.id .info,' client has not specified socket path it wishes to connect to.'.error);
+ return;
+ }
+
+ if(!client.port){
+ client.log('Connecting client on Unix Socket :'.debug, client.path.variable);
+
+ var path = client.path;
+
+ Iif (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
+ path = path.replace(/^\//, '');
+ path = path.replace(/\//g, '-');
+ path= '\\\\.\\pipe\\'+path;
+ }
+ client.socket = net.connect(
+ {
+ path: path
+ }
+ );
+ }else{
+ Eif(!client.config.tls){
+ client.log('Connecting client via TCP to'.debug, client.path.variable ,client.port);
+ client.socket = net.connect(
+ {
+ port:client.port,
+ host:client.path
+ }
+ );
+ }else{
+ client.log('Connecting client via TLS to'.debug, client.path.variable ,client.port,client.config.tls);
+ if(client.config.tls.private){
+ client.config.tls.key=fs.readFileSync(client.config.tls.private);
+ }
+ if(client.config.tls.public){
+ client.config.tls.cert=fs.readFileSync(client.config.tls.public);
+ }
+ if(client.config.tls.trustedConnections){
+ if(typeof client.config.tls.trustedConnections === 'string'){
+ client.config.tls.trustedConnections=[client.config.tls.trustedConnections];
+ }
+ client.config.tls.ca=[];
+ for(var i=0; i<client.config.tls.trustedConnections.length; i++){
+ client.config.tls.ca.push(
+ fs.readFileSync(client.config.tls.trustedConnections[i])
+ );
+ }
+ }
+
+ client.config.tls.host=client.path;
+ client.config.tls.port=client.port;
+
+ client.socket = tls.connect(
+ client.config.tls
+ );
+ }
+ }
+
+ client.socket.setEncoding(this.config.encoding);
+
+ client.socket.on(
+ 'error',
+ function(err){
+ client.log('\n\n######\nerror: '.error, err);
+ client.trigger('error', err);
+
+ }
+ );
+
+ client.socket.on(
+ 'connect',
+ function(){
+ client.trigger('connect');
+ client.retriesRemaining=client.config.maxRetries;
+ client.log('retrying reset');
+ }
+ );
+
+ client.socket.on(
+ 'close',
+ function(){
+ client.log('connection closed'.notice ,client.id.variable , client.path.variable, client.retriesRemaining+' tries remaining of '+client.config.maxRetries);
+
+ if(
+ client.config.stopRetrying || client.retriesRemaining<1
+
+ ){
+ client.trigger('disconnect');
+ client.log(
+ client.config.id.variable,
+ 'exceeded connection rety amount of'.warn,
+ " or stopRetrying flag set."
+ );
+
+ client.socket.destroy();
+ client.trigger('destroy');
+ client=undefined;
+
+ return;
+ }
+
+ client.isRetrying=true;
+
+ setTimeout(
+ (
+ function(client){
+ return function(){
+ client.retriesRemaining--;
+ client.isRetrying=false;
+ client.connect();
+ setTimeout(
+ function(){
+ if(!client.isRetrying)
+ client.retriesRemaining=client.config.maxRetries;
+ },
+ 100
+ )
+ }
+ }
+ )(client),
+ client.config.retry
+ );
+
+ client.trigger('disconnect');
+ }
+ );
+
+ client.socket.on(
+ 'data',
+ function(data) {
+ client.log('## recieved events ##'.rainbow);
+ Iif(client.config.rawBuffer){
+ client.trigger(
+ 'data',
+ new Buffer(data,this.encoding)
+ );
+ if(!client.config.sync){
+ return;
+ }
+
+ client.queue.next();
+ return;
+ }
+
+ Eif(!this.ipcBuffer)
+ this.ipcBuffer='';
+
+ data=(this.ipcBuffer+=data);
+
+ Iif(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
+ client.log('Implementing larger buffer for this socket message. You may want to consider smaller messages'.notice);
+ return;
+ }
+
+ this.ipcBuffer='';
+
+ var events = eventParser.parse(data);
+ var eCount = events.length;
+ for(var i=0; i<eCount; i++){
+ var message=new Message;
+ message.load(events[i]);
+
+ client.log('detected event of type '.debug, message.type.data, message.data);
+ client.trigger(
+ message.type,
+ message.data
+ );
+ }
+
+ Iif(!client.config.sync){
+ return;
+ }
+
+ client.queue.next();
+ }
+ );
+}
+
+module.exports=init;
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/lib/eventParser.js.html b/spec/coverage/lcov-report/node-ipc/lib/eventParser.js.html
new file mode 100644
index 0000000..c5cb878
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/lib/eventParser.js.html
@@ -0,0 +1,146 @@
+
+
+
+ Code coverage report for node-ipc/lib/eventParser.js
+
+
+
+
+
+
+
+
+
+
+
+
+ 85.71%
+ Statements
+ 12/14
+
+
+ 50%
+ Branches
+ 2/4
+
+
+ 100%
+ Functions
+ 2/2
+
+
+ 85.71%
+ Lines
+ 12/14
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28 | 1×
+
+1×
+14×
+
+
+14×
+
+
+
+14×
+14×
+
+
+1×
+15×
+15×
+15×
+
+
+1×
+
+
+
+
+
+1×
+ | var Message = require('js-message');
+
+function formatData(message){
+ Iif(!message.data){
+ message.data={};
+ }
+ Iif(message.data['_maxListeners']){
+ message.data={};
+ }
+
+ message=message.JSON+parser.delimiter;
+ return message;
+};
+
+function parseDataEvents(data){
+ var events=data.split(parser.delimiter);
+ events.pop();
+ return events;
+}
+
+var parser={
+ parse : parseDataEvents,
+ format : formatData,
+ delimiter : '\f'
+}
+
+module.exports=parser;
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/lib/index.html b/spec/coverage/lcov-report/node-ipc/lib/index.html
new file mode 100644
index 0000000..12aa6f2
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/lib/index.html
@@ -0,0 +1,119 @@
+
+
+
+ Code coverage report for node-ipc/lib/
+
+
+
+
+
+
+
+
+
+
+
+
+ 64.07%
+ Statements
+ 173/270
+
+
+ 52.31%
+ Branches
+ 68/130
+
+
+ 78.79%
+ Functions
+ 26/33
+
+
+ 64.07%
+ Lines
+ 173/270
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ client.js |
+ |
+ 73.08% |
+ 76/104 |
+ 52.38% |
+ 22/42 |
+ 100% |
+ 11/11 |
+ 73.08% |
+ 76/104 |
+
+
+
+ eventParser.js |
+ |
+ 85.71% |
+ 12/14 |
+ 50% |
+ 2/4 |
+ 100% |
+ 2/2 |
+ 85.71% |
+ 12/14 |
+
+
+
+ socketServer.js |
+ |
+ 55.92% |
+ 85/152 |
+ 52.38% |
+ 44/84 |
+ 65% |
+ 13/20 |
+ 55.92% |
+ 85/152 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/lib/socketServer.js.html b/spec/coverage/lcov-report/node-ipc/lib/socketServer.js.html
new file mode 100644
index 0000000..50d308a
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/lib/socketServer.js.html
@@ -0,0 +1,1157 @@
+
+
+
+ Code coverage report for node-ipc/lib/socketServer.js
+
+
+
+
+
+
+
+
+
+
+
+
+ 55.92%
+ Statements
+ 85/152
+
+
+ 52.38%
+ Branches
+ 44/84
+
+
+ 65%
+ Functions
+ 13/20
+
+
+ 55.92%
+ Lines
+ 85/152
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+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
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365 | 1×
+
+
+
+
+
+
+
+1×
+2×
+
+2×
+2×
+2×
+
+2×
+
+
+2×
+
+
+2×
+
+2×
+
+
+
+
+
+2×
+
+
+
+2×
+
+
+
+
+
+1×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1×
+4×
+
+
+
+
+
+
+
+
+
+
+
+4×
+
+
+
+
+
+
+
+
+4×
+
+
+
+
+4×
+
+
+
+4×
+4×
+
+4×
+2×
+2×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1×
+2×
+2×
+
+
+
+
+
+
+2×
+1×
+1×
+
+
+
+
+
+
+
+
+
+
+2×
+
+
+2×
+2×
+
+
+2×
+
+
+
+
+4×
+
+
+
+
+
+
+
+
+
+
+
+4×
+
+1×
+4×
+
+4×
+2×
+
+4×
+4×
+
+
+
+
+
+
+
+
+
+4×
+
+
+
+
+
+
+
+
+4×
+
+
+3×
+3×
+
+
+
+
+
+
+
+
+
+3×
+3×
+
+3×
+
+3×
+
+
+
+
+3×
+
+3×
+
+3×
+3×
+3×
+
+3×
+
+3×
+3×
+
+3×
+
+
+
+
+
+
+
+
+4×
+
+
+1×
+
+1×
+1×
+
+1×
+
+
+1×
+
+1×
+
+
+
+4×
+
+
+
+
+4×
+
+
+
+
+1×
+4×
+
+
+4×
+1×
+1×
+
+
+
+
+
+1×
+
+
+
+
+1×
+
+
+3×
+1×
+1×
+
+
+
+
+1×
+
+
+2×
+2×
+
+
+
+
+2×
+
+
+
+
+
+
+
+
+
+
+
+
+4×
+
+4×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4×
+
+
+1×
+ | var net = require('net'),
+ tls = require('tls'),
+ fs = require('fs'),
+ dgram = require('dgram'),
+ eventParser = require('../lib/eventParser.js'),
+ pubsub = require('event-pubsub'),
+ Message = require('js-message');
+
+function emit(socket, type, data){
+ this.log('dispatching event to socket'.debug, ' : ', type.data, data);
+
+ var message=new Message;
+ message.type=type;
+ message.data=data;
+
+ Iif(this.config.rawBuffer){
+ message=new Buffer(type,this.encoding);
+ }else{
+ message=eventParser.format(message);
+ }
+
+ Eif(this.udp4 || this.udp6){
+
+ Iif(!socket.address || !socket.port){
+ this.log('Attempting to emit to a single UDP socket without supplying socket address or port. Redispatching event as broadcast to all connected sockets');
+ this.broadcast(type,data);
+ return;
+ }
+
+ this.server.write(
+ message,
+ socket
+ );
+ return;
+ };
+
+ socket.write(message);
+};
+
+function broadcast(type,data){
+ this.log('broadcasting event to all known sockets listening to '.debug, this.path.variable,' : ', ((this.port)?this.port:''), type, data);
+ var message=new Message;
+ message.type=type;
+ message.data=data;
+
+ if(this.config.rawBuffer){
+ message=new Buffer(type,this.encoding);
+ }else{
+ message=eventParser.format(message);
+ }
+
+ if(this.udp4 || this.udp6){
+ for(var i=1, count=this.sockets.length; i<count; i++){
+ this.server.write(message,this.sockets[i]);
+ }
+ }else{
+ for(var i=0, count=this.sockets.length; i<count; i++){
+ this.sockets[i].write(message);
+ }
+ }
+};
+
+function init(path,config,log,port){
+ var server={
+ config : config,
+ path : path,
+ port : port,
+ udp4 : false,
+ udp6 : false,
+ log : log,
+ server : false,
+ sockets : [],
+ emit : emit,
+ broadcast : broadcast,
+ onStart : function(socket){
+ this.trigger(
+ 'start',
+ socket
+ );
+ },
+ stop:function(){
+ server.server.close();
+ },
+ start : function(){
+ Iif(!this.path){
+ server.log('Socket Server Path not specified, refusing to start'.warn);
+ return;
+ }
+
+ fs.unlink(
+ this.path,
+ (
+ function(server){
+ return function () {
+ server.log('starting server on '.debug,server.path.variable,((server.port)?':'+server.port:'').variable);
+
+ if(!server.udp4 && !server.udp6){
+ Eif(!server.config.tls){
+ server.server=net.createServer(
+ serverCreated
+ );
+ }else{
+ server.log('starting TLS server'.debug,server.config.tls);
+ if(server.config.tls.private){
+ server.config.tls.key=fs.readFileSync(server.config.tls.private);
+ }else{
+ server.config.tls.key=fs.readFileSync(__dirname+'/../local-node-ipc-certs/private/server.key');
+ }
+ if(server.config.tls.public){
+ server.config.tls.cert=fs.readFileSync(server.config.tls.public);
+ }else{
+ server.config.tls.cert=fs.readFileSync(__dirname+'/../local-node-ipc-certs/server.pub');
+ }
+ if(server.config.tls.dhparam){
+ server.config.tls.dhparam=fs.readFileSync(server.config.tls.dhparam);
+ }
+ if(server.config.tls.trustedConnections){
+ if(typeof server.config.tls.trustedConnections === 'string'){
+ server.config.tls.trustedConnections=[server.config.tls.trustedConnections];
+ }
+ server.config.tls.ca=[];
+ for(var i=0; i<server.config.tls.trustedConnections.length; i++){
+ server.config.tls.ca.push(
+ fs.readFileSync(server.config.tls.trustedConnections[i])
+ );
+ }
+ }
+ server.server=tls.createServer(
+ server.config.tls,
+ serverCreated
+ );
+ }
+ }else{
+ function UDPWrite(message,socket){
+ var data=new Buffer(message, server.config.encoding);
+ server.server.send(
+ data,
+ 0,
+ data.length,
+ socket.port,
+ socket.address,
+ function(err, bytes) {
+ if(err){
+ server.log('error writing data to socket'.warn,err);
+ server.trigger(
+ 'error',
+ function(err){
+ server.trigger('error',err);
+ }
+ );
+ }
+ }
+ );
+ }
+
+ server.server=dgram.createSocket(
+ ((server.udp4)? 'udp4':'udp6')
+ );
+ server.server.write=UDPWrite;
+ server.server.on(
+ 'listening',
+ function () {
+ serverCreated(server.server)
+ }
+ );
+ }
+
+ server.server.on(
+ 'error',
+ function(err){
+ server.log('server error'.warn,err);
+
+ server.trigger(
+ 'error',
+ err
+ )
+ }
+ );
+
+ server.server.maxConnections=server.config.maxConnections;
+
+ function serverCreated(socket) {
+ server.sockets.push(socket);
+
+ if(socket.setEncoding)
+ socket.setEncoding(server.config.encoding);
+
+ server.log('## socket connection to server detected ##'.rainbow);
+ socket.on(
+ 'close',
+ function(socket){
+ server.trigger(
+ 'close',
+ socket
+ );
+ }
+ );
+
+ socket.on(
+ 'error',
+ function(err){
+ server.log('server socket error'.warn,err);
+
+ server.trigger('error',err);
+ }
+ );
+
+ socket.on(
+ 'data',
+ function(data,UDPSocket){
+ var sock=((server.udp4 || server.udp6)? UDPSocket : socket);
+ Iif(server.config.rawBuffer){
+ data=new Buffer(data,this.encoding);
+ server.trigger(
+ 'data',
+ data,
+ sock
+ );
+ return;
+ }
+
+ Eif(!this.ipcBuffer)
+ this.ipcBuffer='';
+
+ data=(this.ipcBuffer+=data);
+
+ Iif(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
+ server.log('Implementing larger buffer for this socket message. You may want to consider smaller messages'.notice);
+ return;
+ }
+
+ this.ipcBuffer='';
+
+ data=eventParser.parse(data);
+
+ while(data.length>0){
+ var message=new Message;
+ message.load(data.shift());
+
+ server.log('received event of : '.debug,message.type.data,message.data);
+
+ Eif(message.data.id)
+ sock.id=message.data.id;
+
+ server.trigger(
+ message.type,
+ message.data,
+ sock
+ );
+ }
+ }
+ );
+
+ socket.on(
+ 'message',
+ function(msg,rinfo) {
+ Iif (!rinfo)
+ return;
+ server.log('Received UDP message from '.debug, rinfo.address.variable, rinfo.port);
+ var data;
+
+ Iif(server.config.rawSocket){
+ data=new Buffer(msg,this.encoding);
+ }else{
+ data=msg.toString();
+ }
+ socket.emit('data',data,rinfo);
+ }
+ );
+
+ server.trigger(
+ 'connect',
+ socket
+ );
+
+ Iif(server.config.rawBuffer){
+ return;
+ }
+ }
+
+ function started(socket){
+ server.onStart(socket)
+ }
+
+ if(!port){
+ server.log('starting server as'.debug, 'Unix || Windows Socket'.variable);
+ Iif (process.platform ==='win32'){
+ server.path = server.path.replace(/^\//, '');
+ server.path = server.path.replace(/\//g, '-');
+ server.path= '\\\\.\\pipe\\'+server.path;
+ }
+
+ server.server.listen(
+ server.path,
+ started
+ );
+
+ return;
+ }
+
+ if(!server.udp4 && !server.udp6){
+ server.log('starting server as'.debug, (server.config.tls?'TLS':'TCP').variable);
+ server.server.listen(
+ server.port,
+ server.path,
+ started
+ );
+ return;
+ }
+
+ server.log('starting server as'.debug,((server.udp4)? 'udp4':'udp6').variable);
+ server.server.bind(
+ server.port,
+ server.path
+ );
+
+ started(
+ {
+ address : server.path,
+ port : server.port
+ }
+ );
+ }
+ }
+ )(this)
+ );
+ }
+ };
+
+ new pubsub(server);
+
+ server.on(
+ 'close',
+ function(){
+ for(var i=0, count=server.sockets.length; i<count; i++){
+ var socket=server.sockets[i];
+ var destroyedSocketId=false;
+
+ if(socket){
+ if(socket.readable)
+ continue;
+ }
+
+ if(socket.id)
+ destroyedSocketId=socket.id;
+
+ server.log('socket disconnected'.notice,' '+destroyedSocketId.variable);
+
+ if(socket)
+ socket.destroy();
+
+ server.sockets.splice(i,1);
+
+ server.trigger('socket.disconnected', socket, destroyedSocketId);
+
+ return;
+ }
+ }
+ );
+
+ return server;
+}
+
+module.exports=init;
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/node-ipc/node-ipc.js.html b/spec/coverage/lcov-report/node-ipc/node-ipc.js.html
new file mode 100644
index 0000000..075a47d
--- /dev/null
+++ b/spec/coverage/lcov-report/node-ipc/node-ipc.js.html
@@ -0,0 +1,989 @@
+
+
+
+ Code coverage report for node-ipc/node-ipc.js
+
+
+
+
+
+
+
+
+
+
+
+
+ 70.37%
+ Statements
+ 95/135
+
+
+ 61.11%
+ Branches
+ 44/72
+
+
+ 60%
+ Functions
+ 6/10
+
+
+ 70.37%
+ Lines
+ 95/135
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+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
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309 | 1×
+
+
+
+
+
+
+
+
+1×
+
+
+
+
+
+
+
+
+
+
+
+1×
+
+
+
+1×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1×
+
+
+
+
+
+
+
+
+
+
+
+1×
+140×
+69×
+
+71×
+
+71×
+229×
+210×
+
+19×
+
+
+71×
+
+
+
+
+1×
+8×
+
+
+8×
+
+8×
+8×
+8×
+8×
+
+
+8×
+
+
+1×
+1×
+1×
+1×
+
+1×
+1×
+
+
+
+
+1×
+
+
+1×
+
+
+1×
+
+
+
+
+
+1×
+
+
+
+
+
+1×
+3×
+1×
+1×
+1×
+1×
+
+3×
+1×
+1×
+1×
+1×
+
+3×
+2×
+
+
+
+
+2×
+
+3×
+
+
+
+
+
+
+3×
+
+
+
+
+3×
+
+
+
+
+3×
+1×
+
+
+
+
+1×
+
+
+3×
+
+
+
+
+3×
+
+
+
+3×
+
+
+
+
+
+
+3×
+2×
+
+3×
+
+
+
+
+
+1×
+4×
+2×
+2×
+
+
+4×
+
+
+4×
+
+
+
+
+
+
+
+4×
+2×
+
+
+
+
+2×
+
+
+4×
+
+
+
+
+
+
+
+
+
+
+
+
+4×
+4×
+4×
+
+4×
+
+4×
+
+
+1×
+4×
+
+
+
+
+
+
+4×
+4×
+4×
+4×
+
+4×
+
+
+
+
+4×
+4×
+
+
+
+
+4×
+
+
+4×
+
+
+
+4×
+
+
+
+
+
+
+
+
+4×
+
+
+
+4×
+
+
+4×
+
+
+
+
+
+
+
+
+
+
+
+
+4×
+4×
+4×
+4×
+
+4×
+
+4×
+
+
+1×
+ | var os = require('os'),
+ dns = require('dns'),
+ util = require('util'),
+ colors = require('colors'),
+ pubsub = require('event-pubsub'),
+ eventParser = require('./lib/eventParser.js'),
+ Client = require('./lib/client.js'),
+ Server = require('./lib/socketServer.js');
+
+colors.setTheme(
+ {
+ good : 'green',
+ notice : 'yellow',
+ warn : 'red',
+ error : 'redBG',
+ debug : 'magenta',
+ variable: 'cyan',
+ data : 'blue'
+ }
+);
+
+var IPType=os.networkInterfaces()[
+ Object.keys(os.networkInterfaces())[0]
+][0].family
+
+var defaults={
+ appspace : 'app.',
+ socketRoot : '/tmp/',
+ networkHost : (IPType=='IPv6')? '::1' : '127.0.0.1',
+ networkPort : 8000,
+ id : os.hostname(),
+ encoding : 'utf8',
+ rawBuffer : false,
+ sync : false,
+ silent : false,
+ maxConnections : 100,
+ retry : 500,
+ maxRetries : Infinity,
+ stopRetrying : false,
+ IPType : IPType,
+ tls : false
+}
+
+var ipc = {
+ config : defaults,
+ connectTo : connect,
+ connectToNet: connectNet,
+ disconnect : disconnect,
+ serve : serve,
+ serveNet : serveNet,
+ of : {},
+ server : false,
+ log : log
+}
+
+function log(){
+ if(ipc.config.silent)
+ return;
+
+ var args=Array.prototype.slice.call(arguments);
+
+ for(var i=0, count=args.length; i<count; i++){
+ if(typeof args[i] != 'object')
+ continue;
+
+ args[i]=util.inspect(args[i],{colors:true});
+ }
+
+ console.log(
+ args.join(' ')
+ );
+}
+
+function disconnect(id){
+ Iif(!ipc.of[id])
+ return;
+
+ ipc.of[id].config.stopRetrying=true;
+
+ ipc.of[id].off('*');
+ Eif(ipc.of[id].socket){
+ Eif(ipc.of[id].socket.destroy)
+ ipc.of[id].socket.destroy();
+ }
+
+ delete ipc.of[id];
+}
+
+function serve(path,callback){
+ Eif(typeof path=='function'){
+ callback=path;
+ path=false;
+ }
+ Eif(!path){
+ ipc.log(
+ 'Server path not specified, so defaulting to'.notice,
+ 'ipc.config.socketRoot + ipc.config.appspace + ipc.config.id'.variable,
+ (ipc.config.socketRoot+ipc.config.appspace+ipc.config.id).data
+ );
+ path=ipc.config.socketRoot+ipc.config.appspace+ipc.config.id;
+ }
+
+ Iif(!callback)
+ callback=function(){};
+
+ ipc.server=new Server(
+ path,
+ ipc.config,
+ log
+ );
+
+ ipc.server.on(
+ 'start',
+ callback
+ );
+}
+
+function serveNet(host,port,UDPType,callback){
+ if(typeof host=='number'){
+ callback=UDPType;
+ UDPType=port;
+ port=host;
+ host=false;
+ }
+ if(typeof host=='function'){
+ callback=host;
+ UDPType=false;
+ host=false;
+ port=false;
+ }
+ if(!host){
+ ipc.log(
+ 'Server host not specified, so defaulting to'.notice,
+ 'ipc.config.networkHost'.variable,
+ ipc.config.networkHost.data
+ );
+ host=ipc.config.networkHost;
+ }
+ Iif(host.toLowerCase()=='udp4' || host.toLowerCase()=='udp6'){
+ callback=port;
+ UDPType=host.toLowerCase();
+ port=false;
+ host=ipc.config.networkHost;
+ }
+
+ Iif(typeof port=='string'){
+ callback=UDPType;
+ UDPType=port;
+ port=false;
+ }
+ Iif(typeof port=='function'){
+ callback=port;
+ UDPType=false;
+ port=false;
+ }
+ if(!port){
+ ipc.log(
+ 'Server port not specified, so defaulting to'.notice,
+ 'ipc.config.networkPort'.variable,
+ ipc.config.networkPort
+ );
+ port=ipc.config.networkPort;
+ }
+
+ Iif(typeof UDPType=='function'){
+ callback=UDPType;
+ UDPType=false;
+ }
+
+ Iif(!callback)
+ callback=function(){};
+
+
+ ipc.server=new Server(
+ host,
+ ipc.config,
+ log,
+ port
+ );
+
+ if(UDPType)
+ ipc.server[UDPType]=true;
+
+ ipc.server.on(
+ 'start',
+ callback
+ );
+}
+
+function connect(id,path,callback){
+ if(typeof path == 'function'){
+ callback=path;
+ path=false;
+ }
+
+ Iif(!callback)
+ callback=function(){};
+
+ Iif(!id){
+ ipc.log(
+ 'Service id required'.warn,
+ 'Requested service connection without specifying service id. Aborting connection attempt'.notice
+ );
+ return;
+ }
+
+ if(!path){
+ ipc.log(
+ 'Service path not specified, so defaulting to'.notice,
+ 'ipc.config.socketRoot + ipc.config.appspace + id'.variable,
+ (ipc.config.socketRoot+ipc.config.appspace+id).data
+ );
+ path=ipc.config.socketRoot+ipc.config.appspace+id;
+ }
+
+ Iif(ipc.of[id]){
+ if(!ipc.of[id].socket.destroyed){
+ ipc.log(
+ 'Already Connected to'.notice,
+ id.variable,
+ '- So executing success without connection'.notice
+ );
+ callback();
+ return;
+ }
+ ipc.of[id].socket.destroy();
+ }
+
+ ipc.of[id] = new Client(ipc.config,ipc.log);
+ ipc.of[id].id = id;
+ ipc.of[id].path = path;
+
+ ipc.of[id].connect();
+
+ callback(ipc);
+}
+
+function connectNet(id,host,port,callback){
+ Iif(!id){
+ ipc.log(
+ 'Service id required'.warn,
+ 'Requested service connection without specifying service id. Aborting connection attempt'.notice
+ );
+ return;
+ }
+ Eif(typeof host=='number'){
+ callback=port;
+ port=host;
+ host=false;
+ }
+ Iif(typeof host=='function'){
+ callback=host;
+ host=false;
+ port=false;
+ }
+ Eif(!host){
+ ipc.log(
+ 'Server host not specified, so defaulting to'.notice,
+ 'ipc.config.networkHost'.variable,
+ ipc.config.networkHost.data
+ );
+ host=ipc.config.networkHost;
+ }
+
+ Iif(typeof port=='function'){
+ callback=port;
+ port=false;
+ }
+ Iif(!port){
+ ipc.log(
+ 'Server port not specified, so defaulting to'.notice,
+ 'ipc.config.networkPort'.variable,
+ ipc.config.networkPort
+ );
+ port=ipc.config.networkPort;
+ }
+
+ Iif(typeof callback == 'string'){
+ UDPType=callback;
+ callback=false;
+ }
+ Iif(!callback)
+ callback=function(){};
+
+ Iif(ipc.of[id]){
+ if(!ipc.of[id].socket.destroyed){
+ ipc.log(
+ 'Already Connected to'.notice,
+ id.variable,
+ '- So executing success without connection'.notice
+ );
+ callback();
+ return;
+ }
+ ipc.of[id].socket.destroy();
+ }
+
+ ipc.of[id] = new Client(ipc.config,ipc.log);
+ ipc.of[id].id = id;
+ ipc.of[id].path = host;
+ ipc.of[id].port = port;
+
+ ipc.of[id].connect();
+
+ callback(ipc);
+}
+
+module.exports=ipc;
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/coverage/lcov-report/prettify.css b/spec/coverage/lcov-report/prettify.css
new file mode 100644
index 0000000..b317a7c
--- /dev/null
+++ b/spec/coverage/lcov-report/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
diff --git a/spec/coverage/lcov-report/prettify.js b/spec/coverage/lcov-report/prettify.js
new file mode 100644
index 0000000..ef51e03
--- /dev/null
+++ b/spec/coverage/lcov-report/prettify.js
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^