diff --git a/example/TCPSocket/Multi-Client-Broadcast/goodbye-client.js b/example/TCPSocket/Multi-Client-Broadcast/goodbye-client.js index ef751c7..14de4cc 100644 --- a/example/TCPSocket/Multi-Client-Broadcast/goodbye-client.js +++ b/example/TCPSocket/Multi-Client-Broadcast/goodbye-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'goodbye'; +ipc.config.id = 'goodbye'; ipc.config.retry= 1500; ipc.config.maxRetries= 10; @@ -24,7 +24,7 @@ ipc.connectToNet( id : ipc.config.id, message : 'goodbye' } - ) + ); } ); ipc.of.world.on( diff --git a/example/TCPSocket/Multi-Client-Broadcast/hello-client.js b/example/TCPSocket/Multi-Client-Broadcast/hello-client.js index 69bc727..5f57d20 100644 --- a/example/TCPSocket/Multi-Client-Broadcast/hello-client.js +++ b/example/TCPSocket/Multi-Client-Broadcast/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.maxRetries=10; @@ -24,7 +24,7 @@ ipc.connectToNet( id : ipc.config.id, message : 'hello' } - ) + ); } ); ipc.of.world.on( diff --git a/example/TCPSocket/Multi-Client-Broadcast/world-server.js b/example/TCPSocket/Multi-Client-Broadcast/world-server.js index 5d0844f..a1dc9f4 100644 --- a/example/TCPSocket/Multi-Client-Broadcast/world-server.js +++ b/example/TCPSocket/Multi-Client-Broadcast/world-server.js @@ -7,13 +7,13 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; var messages={ goodbye:false, hello:false -} +}; ipc.serveNet( function(){ diff --git a/example/TCPSocket/basic/hello-client.js b/example/TCPSocket/basic/hello-client.js index 88629be..9cdde05 100644 --- a/example/TCPSocket/basic/hello-client.js +++ b/example/TCPSocket/basic/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.connectToNet( @@ -20,7 +20,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello' - ) + ); } ); ipc.of.world.on( @@ -38,4 +38,4 @@ ipc.connectToNet( } ); -console.log(ipc) \ No newline at end of file +console.log(ipc); \ No newline at end of file diff --git a/example/TCPSocket/basic/world-server.js b/example/TCPSocket/basic/world-server.js index 7c8c855..19ee193 100644 --- a/example/TCPSocket/basic/world-server.js +++ b/example/TCPSocket/basic/world-server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.maxConnections=1; @@ -28,7 +28,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } @@ -37,8 +37,8 @@ ipc.serveNet( ipc.server.on( 'error', function(err){ - ipc.log('Got an ERROR!'.warn,err) + ipc.log('Got an ERROR!'.warn,err); } -) +); ipc.server.start(); diff --git a/example/TCPSocket/basicSync/hello-client.js b/example/TCPSocket/basicSync/hello-client.js index 76875ec..9f69792 100644 --- a/example/TCPSocket/basicSync/hello-client.js +++ b/example/TCPSocket/basicSync/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.sync= true; @@ -24,7 +24,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello'+i - ) + ); } } ); @@ -43,4 +43,4 @@ ipc.connectToNet( } ); -console.log(ipc) +console.log(ipc); diff --git a/example/TCPSocket/basicSync/world-server.js b/example/TCPSocket/basicSync/world-server.js index 4ea38d5..388dd05 100644 --- a/example/TCPSocket/basicSync/world-server.js +++ b/example/TCPSocket/basicSync/world-server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.sync = true; @@ -34,7 +34,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TCPSocket/rawBuffer/hello-client.js b/example/TCPSocket/rawBuffer/hello-client.js index 4f8831e..245359e 100644 --- a/example/TCPSocket/rawBuffer/hello-client.js +++ b/example/TCPSocket/rawBuffer/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; @@ -21,7 +21,7 @@ ipc.connectToNet( ipc.log('## connected to world ##'.rainbow, ipc.config.delay); ipc.of.world.emit( 'hello' - ) + ); } ); diff --git a/example/TCPSocket/rawBuffer/world.server.js b/example/TCPSocket/rawBuffer/world.server.js index b042c96..ac05e46 100644 --- a/example/TCPSocket/rawBuffer/world.server.js +++ b/example/TCPSocket/rawBuffer/world.server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; diff --git a/example/TLSSocket/Multi-Client-Broadcast-basic/goodbye-client.js b/example/TLSSocket/Multi-Client-Broadcast-basic/goodbye-client.js index 6c8f8f3..2d8dd43 100644 --- a/example/TLSSocket/Multi-Client-Broadcast-basic/goodbye-client.js +++ b/example/TLSSocket/Multi-Client-Broadcast-basic/goodbye-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'goodbye'; +ipc.config.id = 'goodbye'; ipc.config.retry= 1500; ipc.config.maxRetries= 10; ipc.config.tls={ @@ -27,7 +27,7 @@ ipc.connectToNet( id : ipc.config.id, message : 'goodbye' } - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/Multi-Client-Broadcast-basic/hello-client.js b/example/TLSSocket/Multi-Client-Broadcast-basic/hello-client.js index 7ae92f0..79c27a5 100644 --- a/example/TLSSocket/Multi-Client-Broadcast-basic/hello-client.js +++ b/example/TLSSocket/Multi-Client-Broadcast-basic/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.maxRetries=10; ipc.config.tls={ @@ -27,7 +27,7 @@ ipc.connectToNet( id : ipc.config.id, message : 'hello' } - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/Multi-Client-Broadcast-basic/world-server.js b/example/TLSSocket/Multi-Client-Broadcast-basic/world-server.js index 6214040..dd60c9c 100644 --- a/example/TLSSocket/Multi-Client-Broadcast-basic/world-server.js +++ b/example/TLSSocket/Multi-Client-Broadcast-basic/world-server.js @@ -7,17 +7,17 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.tls={ public: __dirname+'/../../../local-node-ipc-certs/server.pub', private: __dirname+'/../../../local-node-ipc-certs/private/server.key' -} +}; var messages={ goodbye:false, hello:false -} +}; ipc.serveNet( function(){ diff --git a/example/TLSSocket/basic-local-only/hello-client.js b/example/TLSSocket/basic-local-only/hello-client.js index 2712a51..04ab330 100644 --- a/example/TLSSocket/basic-local-only/hello-client.js +++ b/example/TLSSocket/basic-local-only/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.tls={ rejectUnauthorized:false @@ -23,7 +23,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello' - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/basic-local-only/world-server.js b/example/TLSSocket/basic-local-only/world-server.js index 3a6ea04..9b1a3ea 100644 --- a/example/TLSSocket/basic-local-only/world-server.js +++ b/example/TLSSocket/basic-local-only/world-server.js @@ -7,12 +7,12 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; //node-ipc will default to its local certs ipc.config.tls={ rejectUnauthorized:false -} +}; ipc.serveNet( function(){ @@ -31,7 +31,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TLSSocket/basic-more-secure/hello-client.js b/example/TLSSocket/basic-more-secure/hello-client.js index 5f40b04..bf43504 100644 --- a/example/TLSSocket/basic-more-secure/hello-client.js +++ b/example/TLSSocket/basic-more-secure/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.tls={ private: __dirname+'/../../../local-node-ipc-certs/private/client.key', @@ -28,7 +28,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello' - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/basic-more-secure/world-server.js b/example/TLSSocket/basic-more-secure/world-server.js index f1762dc..4ce686a 100644 --- a/example/TLSSocket/basic-more-secure/world-server.js +++ b/example/TLSSocket/basic-more-secure/world-server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.tls={ public: __dirname+'/../../../local-node-ipc-certs/server.pub', @@ -18,7 +18,7 @@ ipc.config.tls={ trustedConnections: [ __dirname+'/../../../local-node-ipc-certs/client.pub' ] -} +}; ipc.serveNet( function(){ @@ -37,7 +37,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TLSSocket/basic-most-secure/hello-client.js b/example/TLSSocket/basic-most-secure/hello-client.js index 1188cfb..5256bce 100644 --- a/example/TLSSocket/basic-most-secure/hello-client.js +++ b/example/TLSSocket/basic-most-secure/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.networkHost='localhost'; ipc.config.tls={ @@ -29,7 +29,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello' - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/basic-most-secure/world-server.js b/example/TLSSocket/basic-most-secure/world-server.js index 4af0315..2d9c434 100644 --- a/example/TLSSocket/basic-most-secure/world-server.js +++ b/example/TLSSocket/basic-most-secure/world-server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.networkHost='localhost'; ipc.config.tls={ @@ -19,7 +19,7 @@ ipc.config.tls={ trustedConnections: [ __dirname+'/../../../local-node-ipc-certs/client.pub' ] -} +}; ipc.serveNet( function(){ @@ -38,7 +38,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TLSSocket/basic/hello-client.js b/example/TLSSocket/basic/hello-client.js index 2712a51..04ab330 100644 --- a/example/TLSSocket/basic/hello-client.js +++ b/example/TLSSocket/basic/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.tls={ rejectUnauthorized:false @@ -23,7 +23,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello' - ) + ); } ); ipc.of.world.on( diff --git a/example/TLSSocket/basic/world-server.js b/example/TLSSocket/basic/world-server.js index 31d4798..72c81c0 100644 --- a/example/TLSSocket/basic/world-server.js +++ b/example/TLSSocket/basic/world-server.js @@ -7,12 +7,12 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.tls={ public: __dirname+'/../../../local-node-ipc-certs/server.pub', private: __dirname+'/../../../local-node-ipc-certs/private/server.key' -} +}; ipc.serveNet( function(){ @@ -31,7 +31,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TLSSocket/basicSync/hello-client.js b/example/TLSSocket/basicSync/hello-client.js index c7451c4..84a490f 100644 --- a/example/TLSSocket/basicSync/hello-client.js +++ b/example/TLSSocket/basicSync/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.sync= true; ipc.config.tls={ @@ -27,7 +27,7 @@ ipc.connectToNet( ipc.of.world.emit( 'message', 'hello'+i - ) + ); } } ); diff --git a/example/TLSSocket/basicSync/world-server.js b/example/TLSSocket/basicSync/world-server.js index d6128b5..3282778 100644 --- a/example/TLSSocket/basicSync/world-server.js +++ b/example/TLSSocket/basicSync/world-server.js @@ -7,13 +7,13 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.sync= true; ipc.config.tls={ public: __dirname+'/../../../local-node-ipc-certs/server.pub', private: __dirname+'/../../../local-node-ipc-certs/private/server.key' -} +}; ipc.serveNet( function(){ @@ -37,7 +37,7 @@ ipc.serveNet( ipc.server.on( 'socket.disconnected', function(data,socket){ - console.log(arguments) + console.log(arguments); } ); } diff --git a/example/TLSSocket/rawBuffer-only-works-with-most-secure/hello-client.js b/example/TLSSocket/rawBuffer-only-works-with-most-secure/hello-client.js index f4cac3e..6b3f129 100644 --- a/example/TLSSocket/rawBuffer-only-works-with-most-secure/hello-client.js +++ b/example/TLSSocket/rawBuffer-only-works-with-most-secure/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; @@ -31,7 +31,7 @@ ipc.connectToNet( ipc.log('## connected to world ##'.rainbow, ipc.config.delay); ipc.of.world.emit( 'hello' - ) + ); } ); diff --git a/example/TLSSocket/rawBuffer-only-works-with-most-secure/world.server.js b/example/TLSSocket/rawBuffer-only-works-with-most-secure/world.server.js index f8394be..ab5d9d9 100644 --- a/example/TLSSocket/rawBuffer-only-works-with-most-secure/world.server.js +++ b/example/TLSSocket/rawBuffer-only-works-with-most-secure/world.server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; @@ -22,7 +22,7 @@ ipc.config.tls={ trustedConnections: [ __dirname+'/../../../local-node-ipc-certs/client.pub' ] -} +}; ipc.serveNet( function(){ diff --git a/example/UDPSocket/Multi-Client-Broadcast/goodbye-client.js b/example/UDPSocket/Multi-Client-Broadcast/goodbye-client.js index 1ebb98b..6056420 100644 --- a/example/UDPSocket/Multi-Client-Broadcast/goodbye-client.js +++ b/example/UDPSocket/Multi-Client-Broadcast/goodbye-client.js @@ -15,7 +15,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'goodbye'; +ipc.config.id = 'goodbye'; ipc.config.retry= 1500; ipc.serveNet( @@ -45,4 +45,4 @@ ipc.serveNet( -ipc.server.start(); \ No newline at end of file +ipc.server.start(); diff --git a/example/UDPSocket/Multi-Client-Broadcast/hello-client.js b/example/UDPSocket/Multi-Client-Broadcast/hello-client.js index 7dda703..10ca453 100644 --- a/example/UDPSocket/Multi-Client-Broadcast/hello-client.js +++ b/example/UDPSocket/Multi-Client-Broadcast/hello-client.js @@ -15,7 +15,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.serveNet( @@ -45,4 +45,4 @@ ipc.serveNet( -ipc.server.start(); \ No newline at end of file +ipc.server.start(); diff --git a/example/UDPSocket/Multi-Client-Broadcast/world-server.js b/example/UDPSocket/Multi-Client-Broadcast/world-server.js index 53c9a4a..6f2ff98 100644 --- a/example/UDPSocket/Multi-Client-Broadcast/world-server.js +++ b/example/UDPSocket/Multi-Client-Broadcast/world-server.js @@ -15,13 +15,13 @@ var ipc=require('../../../node-ipc'); * ***************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; var messages={ goodbye:false, hello:false -} +}; ipc.serveNet( 'udp4', @@ -60,4 +60,4 @@ ipc.serveNet( -ipc.server.start(); \ No newline at end of file +ipc.server.start(); diff --git a/example/UDPSocket/basic/hello-client.js b/example/UDPSocket/basic/hello-client.js index 9b8cf9d..1d060d0 100644 --- a/example/UDPSocket/basic/hello-client.js +++ b/example/UDPSocket/basic/hello-client.js @@ -19,7 +19,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.serveNet( diff --git a/example/UDPSocket/basic/world-server.js b/example/UDPSocket/basic/world-server.js index b305d4e..8946a0f 100644 --- a/example/UDPSocket/basic/world-server.js +++ b/example/UDPSocket/basic/world-server.js @@ -19,7 +19,7 @@ var ipc=require('../../../node-ipc'); * ***************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.serveNet( diff --git a/example/UDPSocket/rawBuffer/hello-client.js b/example/UDPSocket/rawBuffer/hello-client.js index 0da683b..62f31ef 100644 --- a/example/UDPSocket/rawBuffer/hello-client.js +++ b/example/UDPSocket/rawBuffer/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; diff --git a/example/UDPSocket/rawBuffer/world.server.js b/example/UDPSocket/rawBuffer/world.server.js index a425a0d..f430ca1 100644 --- a/example/UDPSocket/rawBuffer/world.server.js +++ b/example/UDPSocket/rawBuffer/world.server.js @@ -19,7 +19,7 @@ var ipc=require('../../../node-ipc'); * ***************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; diff --git a/example/unixWindowsSocket/Multi-Client-Broadcast/goodbye-client.js b/example/unixWindowsSocket/Multi-Client-Broadcast/goodbye-client.js index 77f922f..766ccde 100644 --- a/example/unixWindowsSocket/Multi-Client-Broadcast/goodbye-client.js +++ b/example/unixWindowsSocket/Multi-Client-Broadcast/goodbye-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'goodbye'; +ipc.config.id = 'goodbye'; ipc.config.retry= 1500; ipc.connectTo( @@ -23,7 +23,7 @@ ipc.connectTo( id : ipc.config.id, message : 'goodbye' } - ) + ); } ); ipc.of.world.on( @@ -40,4 +40,4 @@ ipc.connectTo( } ); } -); \ No newline at end of file +); diff --git a/example/unixWindowsSocket/Multi-Client-Broadcast/hello-client.js b/example/unixWindowsSocket/Multi-Client-Broadcast/hello-client.js index 00d70c3..2feb032 100644 --- a/example/unixWindowsSocket/Multi-Client-Broadcast/hello-client.js +++ b/example/unixWindowsSocket/Multi-Client-Broadcast/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.connectTo( @@ -23,7 +23,7 @@ ipc.connectTo( id : ipc.config.id, message : 'hello' } - ) + ); } ); ipc.of.world.on( @@ -46,4 +46,4 @@ ipc.connectTo( } ); } -); \ No newline at end of file +); diff --git a/example/unixWindowsSocket/Multi-Client-Broadcast/world-server.js b/example/unixWindowsSocket/Multi-Client-Broadcast/world-server.js index af3dce8..7d9887a 100644 --- a/example/unixWindowsSocket/Multi-Client-Broadcast/world-server.js +++ b/example/unixWindowsSocket/Multi-Client-Broadcast/world-server.js @@ -7,13 +7,13 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; var messages={ goodbye:false, hello:false -} +}; ipc.serve( function(){ diff --git a/example/unixWindowsSocket/basic/hello-client.js b/example/unixWindowsSocket/basic/hello-client.js index 5e1478c..214f9e7 100644 --- a/example/unixWindowsSocket/basic/hello-client.js +++ b/example/unixWindowsSocket/basic/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry = 1000; ipc.connectTo( @@ -23,7 +23,7 @@ ipc.connectTo( id : ipc.config.id, message : 'hello' } - ) + ); } ); ipc.of.world.on( diff --git a/example/unixWindowsSocket/basic/world-server.js b/example/unixWindowsSocket/basic/world-server.js index 1919d5b..1b0028a 100644 --- a/example/unixWindowsSocket/basic/world-server.js +++ b/example/unixWindowsSocket/basic/world-server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.serve( diff --git a/example/unixWindowsSocket/basicSync/hello-client.js b/example/unixWindowsSocket/basicSync/hello-client.js index 1bd5dc9..cc192c6 100644 --- a/example/unixWindowsSocket/basicSync/hello-client.js +++ b/example/unixWindowsSocket/basicSync/hello-client.js @@ -7,9 +7,9 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry = 1000; -ipc.config.sync= true; +ipc.config.sync= true; ipc.connectTo( 'world', @@ -27,7 +27,7 @@ ipc.connectTo( id : ipc.config.id, message : 'hello'+i } - ) + ); } } ); diff --git a/example/unixWindowsSocket/basicSync/world-server.js b/example/unixWindowsSocket/basicSync/world-server.js index da24ccf..0100630 100644 --- a/example/unixWindowsSocket/basicSync/world-server.js +++ b/example/unixWindowsSocket/basicSync/world-server.js @@ -7,9 +7,9 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; -ipc.config.sync= true; +ipc.config.sync= true; ipc.serve( function(){ diff --git a/example/unixWindowsSocket/rawBuffer/hello-client.js b/example/unixWindowsSocket/rawBuffer/hello-client.js index 3f1486b..9781ba1 100644 --- a/example/unixWindowsSocket/rawBuffer/hello-client.js +++ b/example/unixWindowsSocket/rawBuffer/hello-client.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'hello'; +ipc.config.id = 'hello'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; @@ -21,7 +21,7 @@ ipc.connectTo( ipc.log('## connected to world ##'.rainbow, ipc.config.delay); ipc.of.world.emit( 'hello' - ) + ); } ); diff --git a/example/unixWindowsSocket/rawBuffer/world.server.js b/example/unixWindowsSocket/rawBuffer/world.server.js index f8cb56a..db1b3f2 100644 --- a/example/unixWindowsSocket/rawBuffer/world.server.js +++ b/example/unixWindowsSocket/rawBuffer/world.server.js @@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc'); * * *************************************/ -ipc.config.id = 'world'; +ipc.config.id = 'world'; ipc.config.retry= 1500; ipc.config.rawBuffer=true; ipc.config.encoding='ascii'; diff --git a/lib/client.js b/lib/client.js index 5680a93..18d3f2e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1,13 +1,15 @@ -var net = require('net'), - tls = require('tls'), +'use strict'; + +const 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'); + Pubsub = require('event-pubsub'), + Message = require('js-message'), + fs = require('fs'), + Queue = require('js-queue'); function init(config,log){ - var client={ + let client={ config : config, queue : new Queue, socket : false, @@ -15,7 +17,8 @@ function init(config,log){ emit : emit, log : log, retriesRemaining:config.maxRetries||0 - } + }; + new Pubsub(client); return client; @@ -24,7 +27,7 @@ function init(config,log){ function emit(type,data){ this.log('dispatching event to '.debug, this.id.variable, this.path.variable,' : ', type.data,',', data); - var message=new Message; + let message=new Message; message.type=type; message.data=data; @@ -42,7 +45,7 @@ function emit(type,data){ this.queue.add( syncEmit.bind(this,message) ); -}; +} function syncEmit(message){ this.log('dispatching event to '.debug, this.id.variable, this.path.variable,' : ', message.data); @@ -51,7 +54,7 @@ function syncEmit(message){ function connect(){ //init client object for scope persistance especially inside of socket events. - var client=this; + let client=this; client.log('requested connection to '.debug, client.id.variable, client.path.variable); if(!this.path){ @@ -62,7 +65,7 @@ function connect(){ if(!client.port){ client.log('Connecting client on Unix Socket :'.debug, client.path.variable); - var path = client.path; + let path = client.path; if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){ path = path.replace(/^\//, ''); @@ -96,7 +99,7 @@ function connect(){ client.config.tls.trustedConnections=[client.config.tls.trustedConnections]; } client.config.tls.ca=[]; - for(var i=0; i0){ - var message=new Message; + let message=new Message; message.load(data.shift()); server.log('received event of : '.debug,message.type.data,message.data); @@ -257,7 +257,7 @@ function init(path,config,log,port){ if (!rinfo) return; server.log('Received UDP message from '.debug, rinfo.address.variable, rinfo.port); - var data; + let data; if(server.config.rawSocket){ data=new Buffer(msg,this.encoding); @@ -279,16 +279,16 @@ function init(path,config,log,port){ } function started(socket){ - server.onStart(socket) + server.onStart(socket); } if(!port){ server.log('starting server as'.debug, 'Unix || Windows Socket'.variable); if (process.platform ==='win32'){ - server.path = server.path.replace(/^\//, ''); - server.path = server.path.replace(/\//g, '-'); - server.path= '\\\\.\\pipe\\'+server.path; - } + server.path = server.path.replace(/^\//, ''); + server.path = server.path.replace(/\//g, '-'); + server.path= '\\\\.\\pipe\\'+server.path; + } server.server.listen( server.path, @@ -320,7 +320,7 @@ function init(path,config,log,port){ port : server.port } ); - } + }; } )(this) ); @@ -332,9 +332,9 @@ function init(path,config,log,port){ server.on( 'close', function(){ - for(var i=0, count=server.sockets.length; i122)){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",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); +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',/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],['lang-css',/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],['lang-in.tag',/^(<\/?[a-z][^<>]*>)/i]]),['default-markup','htm','html','mxml','xhtml','xml','xsl']);c(g([[F,/^[\s]+/,null,' \t\r\n'],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],['lang-uq.val',/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],['lang-js',/^on\w+\s*=\s*\"([^\"]+)\"/i],['lang-js',/^on\w+\s*=\s*\'([^\']+)\'/i],['lang-js',/^on\w+\s*=\s*([^\"\'>\s]+)/i],['lang-css',/^style\s*=\s*\"([^\"]+)\"/i],['lang-css',/^style\s*=\s*\'([^\']+)\'/i],['lang-css',/^style\s*=\s*([^\"\'>\s]+)/i]]),['in.tag']);c(g([],[[n,/^[\s\S]+/]]),['uq.val']);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),['c','cc','cpp','cxx','cyc','m']);c(i({keywords:'null,true,false'}),['json']);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),['cs']);c(i({keywords:x,cStyleComments:true}),['java']);c(i({keywords:H,hashComments:true,multiLineStrings:true}),['bsh','csh','sh']);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),['cv','py']);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),['perl','pl','pm']);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),['rb']);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),['js']);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),['coffee']);c(g([],[[C,/^[\s\S]+/]]),['regex']);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V);}catch(W){if('console' in window){console.log(W&&W.stack?W.stack:W);}}}function y(W,V,U){var S=document.createElement('PRE');S.innerHTML=W;if(U){Q(S,U);}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML;}function b(ad){function Y(af){return document.getElementsByTagName(af);}var ac=[Y('pre'),Y('code'),Y('xmp')];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&'CODE'===am.tagName){ah=am.className.match(ab);}if(ah){ah=ah[1];}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==='pre'||ak.tagName==='code'||ak.tagName==='xmp')&&ak.className&&ak.className.indexOf('prettyprint')>=0){al=true;break;}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af);}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S);}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],['lang-',/^<\?([\s\S]+?)(?:\?>|$)/],['lang-',/^<%([\s\S]+?)(?:%>|$)/],['lang-',/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],['lang-handlebars',/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],['lang-js',/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],['lang-css',/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],['lang-in.tag',/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),['handlebars','hbs']);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null,' \t\r\n\f']],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],['lang-css-str',/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],['lang-css-kw',/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),['css']);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),['css-kw']);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),['css-str']); diff --git a/spec/coverage/lcov-report/sorter.js b/spec/coverage/lcov-report/sorter.js index 6c5034e..3d3d84c 100644 --- a/spec/coverage/lcov-report/sorter.js +++ b/spec/coverage/lcov-report/sorter.js @@ -1,5 +1,5 @@ var addSorting = (function () { - "use strict"; + 'use strict'; var cols, currentSort = { index: 0, diff --git a/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js b/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js index 80a8bab..3c76f9d 100644 --- a/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js +++ b/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js @@ -19,7 +19,7 @@ describe('TCP Socket verification of client', ipc.connectToNet( 'tcpFakeServer', 8002, - function(){ + function open(){ ipc.of.tcpFakeServer.on( 'error', function gotError(err){ diff --git a/spec/support/jasmineTest/TCP/tcpSocketServer.spec.js b/spec/support/jasmineTest/TCP/tcpSocketServer.spec.js index cbebb29..88e6ac6 100644 --- a/spec/support/jasmineTest/TCP/tcpSocketServer.spec.js +++ b/spec/support/jasmineTest/TCP/tcpSocketServer.spec.js @@ -6,19 +6,19 @@ describe('TCP Socket verification of server', function TCPSocketSpec(){ it( 'Verify TCP server detects only 1 client out of 2 clients and receives message.', - function(done){ + function testIt(done){ ipc.config.id ='testWorld'; ipc.config.retry = 1000; - + let clientCounter=0; ipc.config.maxConnections=1; ipc.config.networkPort=8500; ipc.serveNet( - function(){ + function serverStarted(){ ipc.server.on( 'connect', - function(data,socket){ + function connected(data,socket){ clientCounter++; } ); @@ -26,7 +26,7 @@ describe('TCP Socket verification of server', ); setTimeout( - function(){ + function timerDelay(){ expect(clientCounter).toBe(ipc.config.maxConnections); ipc.server.stop(); done();