Comparing version 0.9.11 to 0.9.13
@@ -16,2 +16,6 @@ var ipc=require('../../../node-ipc'); | ||
* | ||
* Since there is no open client server | ||
* relationship, you should start world | ||
* first and then hello. | ||
* | ||
* *************************************/ | ||
@@ -30,3 +34,3 @@ | ||
ipc.log('got Data'); | ||
ipc.log('got a message from '.debug, data.from.variable ,' : '.debug, data.message.variable); | ||
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data); | ||
} | ||
@@ -41,3 +45,3 @@ ); | ||
{ | ||
from : ipc.config.id, | ||
id : ipc.config.id, | ||
message : 'Hello' | ||
@@ -44,0 +48,0 @@ } |
@@ -5,6 +5,18 @@ var ipc=require('../../../node-ipc'); | ||
* | ||
* You should start both hello and world | ||
* then you will see them communicating. | ||
* UDP Client is really a UDP server | ||
* | ||
* *************************************/ | ||
* 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. | ||
* | ||
* *************************************// | ||
@@ -21,3 +33,3 @@ ipc.config.id = 'world'; | ||
function(data,socket){ | ||
ipc.log('got a message from '.debug, data.from.variable ,' : '.debug, data.message.variable); | ||
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data); | ||
ipc.server.emit( | ||
@@ -27,3 +39,3 @@ socket, | ||
{ | ||
from : ipc.config.id, | ||
id : ipc.config.id, | ||
message : data.message+' world!' | ||
@@ -35,3 +47,2 @@ } | ||
console.log(ipc.server); | ||
} | ||
@@ -38,0 +49,0 @@ ); |
@@ -47,5 +47,14 @@ var os = require('os'), | ||
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]=JSON.stringify(args[i]); | ||
} | ||
console.log( | ||
Array.prototype.slice.call(arguments).join(' ') | ||
args.join(' ') | ||
); | ||
@@ -52,0 +61,0 @@ } |
{ | ||
"name": "node-ipc", | ||
"version": "0.9.11", | ||
"version": "0.9.13", | ||
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.", | ||
@@ -5,0 +5,0 @@ "main": "node-ipc.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58872
21
1263