Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
745b3dbee9
30 changed files with 456 additions and 186 deletions
35
README.md
35
README.md
|
@ -7,6 +7,7 @@ A great solution for **Neural Networking** in Node.JS
|
||||||
|
|
||||||
|
|
||||||
npm info : [See npm trends and stats for node-ipc](http://npm-stat.com/charts.html?package=node-ipc&author=&from=&to=)
|
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/)
|
||||||
![node-ipc npm version](https://img.shields.io/npm/v/node-ipc.svg) ![supported node version for node-ipc](https://img.shields.io/node/v/node-ipc.svg) ![total npm downloads for node-ipc](https://img.shields.io/npm/dt/node-ipc.svg) ![monthly npm downloads for node-ipc](https://img.shields.io/npm/dm/node-ipc.svg) ![npm licence for node-ipc](https://img.shields.io/npm/l/node-ipc.svg)
|
![node-ipc npm version](https://img.shields.io/npm/v/node-ipc.svg) ![supported node version for node-ipc](https://img.shields.io/node/v/node-ipc.svg) ![total npm downloads for node-ipc](https://img.shields.io/npm/dt/node-ipc.svg) ![monthly npm downloads for node-ipc](https://img.shields.io/npm/dm/node-ipc.svg) ![npm licence for node-ipc](https://img.shields.io/npm/l/node-ipc.svg)
|
||||||
|
|
||||||
[![RIAEvangelist](https://avatars3.githubusercontent.com/u/369041?v=3&s=100)](https://github.com/RIAEvangelist)
|
[![RIAEvangelist](https://avatars3.githubusercontent.com/u/369041?v=3&s=100)](https://github.com/RIAEvangelist)
|
||||||
|
@ -32,13 +33,14 @@ This work is licenced via the [DBAD Public Licence](http://www.dbad-license.org/
|
||||||
5. [serve](#serve)
|
5. [serve](#serve)
|
||||||
6. [serveNet](#servenet)
|
6. [serveNet](#servenet)
|
||||||
3. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)
|
3. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)
|
||||||
4. [Basic Examples](#basic-examples)
|
4. [IPC Events](#ipc-events)
|
||||||
|
5. [Basic Examples](#basic-examples)
|
||||||
1. [Server for Unix||Windows Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)
|
1. [Server for Unix||Windows Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)
|
||||||
2. [Client for Unix||Windows Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
|
2. [Client for Unix||Windows Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
|
||||||
4. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
|
4. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
|
||||||
5. [Raw Buffers or Binary Sockets](#raw-buffer-or-binary-sockets)
|
5. [Raw Buffers or Binary Sockets](#raw-buffer-or-binary-sockets)
|
||||||
5. [Working with TLS/SSL Socket Servers & Clients](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket)
|
6. [Working with TLS/SSL Socket Servers & Clients](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket)
|
||||||
6. [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)
|
7. [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
@ -73,6 +75,7 @@ Set these variables in the `ipc.config` scope to overwrite or set default values
|
||||||
networkPort : 8000,
|
networkPort : 8000,
|
||||||
encoding : 'utf8',
|
encoding : 'utf8',
|
||||||
rawBuffer : false,
|
rawBuffer : false,
|
||||||
|
sync : false,
|
||||||
silent : false,
|
silent : false,
|
||||||
maxConnections : 100,
|
maxConnections : 100,
|
||||||
retry : 500,
|
retry : 500,
|
||||||
|
@ -91,6 +94,7 @@ Set these variables in the `ipc.config` scope to overwrite or set default values
|
||||||
| networkPort| the default port on which TCP, TLS, or UDP sockets should connect |
|
| networkPort| the default port on which TCP, TLS, or UDP sockets should connect |
|
||||||
| encoding | the default encoding for data sent on sockets. Mostly used if rawBuffer is set to true. Valid values are : ` ascii` ` utf8 ` ` utf16le` ` ucs2` ` base64` ` hex ` .
|
| encoding | the default encoding for data sent on sockets. Mostly used if rawBuffer is set to true. Valid values are : ` ascii` ` utf8 ` ` utf16le` ` ucs2` ` base64` ` hex ` .
|
||||||
| rawBuffer| if true, data will be sent and received as a raw node ` Buffer ` __NOT__ an ` Object ` as JSON. This is great for Binary or hex IPC, and communicating with other processes in languages like C and C++ |
|
| rawBuffer| if true, data will be sent and received as a raw node ` Buffer ` __NOT__ an ` Object ` as JSON. This is great for Binary or hex IPC, and communicating with other processes in languages like C and C++ |
|
||||||
|
| sync | synchronous requests. Clients will not send new requests until the server answers. |
|
||||||
| silent | turn on/off logging default is false which means logging is on |
|
| silent | turn on/off logging default is false which means logging is on |
|
||||||
| maxConnections| this is the max number of connections allowed to a socket. It is currently only being set on Unix Sockets. Other Socket types are using the system defaults. |
|
| maxConnections| this is the max number of connections allowed to a socket. It is currently only being set on Unix Sockets. Other Socket types are using the system defaults. |
|
||||||
| retry | this is the time in milliseconds a client will wait before trying to reconnect to a server if the connection is lost. This does not effect UDP sockets since they do not have a client server relationship like Unix Sockets and TCP Sockets. |
|
| retry | this is the time in milliseconds a client will wait before trying to reconnect to a server if the connection is lost. This does not effect UDP sockets since they do not have a client server relationship like Unix Sockets and TCP Sockets. |
|
||||||
|
@ -436,6 +440,20 @@ or specifying everything UDP
|
||||||
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the `ipc.connectTo` or `iupc.connectToNet`. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
|
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the `ipc.connectTo` or `iupc.connectToNet`. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
|
||||||
| ipc.server| This is a refrence to the server created by `ipc.serve` or `ipc.serveNet`|
|
| ipc.server| This is a refrence to the server created by `ipc.serve` or `ipc.serveNet`|
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
### IPC Events
|
||||||
|
|
||||||
|
|event name|params|definition|
|
||||||
|
|----------|------|----------|
|
||||||
|
|error|err obj|triggered when an error has occured|
|
||||||
|
|connect||triggered when socket connected|
|
||||||
|
|disconnect||triggered when socket disconnected|
|
||||||
|
|destroy||triggered when socket has been totally destroyed, no further auto retries will happen and all references are gone.|
|
||||||
|
|data|buffer|triggered when ipc.config.rawBuffer is true and a message is received.|
|
||||||
|
|***your event type***|***your event data***|triggered when a JSON message is received. The event name will be the type string from your message and the param will be the data object from your message eg : ` { type:'myEvent',data:{a:1}} ` |
|
||||||
|
||||
|
||||||
|
|
||||||
----
|
----
|
||||||
### Basic Examples
|
### Basic Examples
|
||||||
You can find [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example) in the examples folder. In the examples you will find more complex demos including multi client examples.
|
You can find [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example) in the examples folder. In the examples you will find more complex demos including multi client examples.
|
||||||
|
@ -458,7 +476,8 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
|
||||||
ipc.log('got a message : '.debug, data);
|
ipc.log('got a message : '.debug, data);
|
||||||
ipc.server.emit(
|
ipc.server.emit(
|
||||||
socket,
|
socket,
|
||||||
'message',
|
'message', //this can be anything you want so long as
|
||||||
|
//your client knows.
|
||||||
data+' world!'
|
data+' world!'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -488,7 +507,7 @@ The client connects to the servers socket for Inter Process Communication. The s
|
||||||
function(){
|
function(){
|
||||||
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
|
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
|
||||||
ipc.of.world.emit(
|
ipc.of.world.emit(
|
||||||
'message',
|
'message', //any event or message type your server listens for
|
||||||
'hello'
|
'hello'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -500,7 +519,7 @@ The client connects to the servers socket for Inter Process Communication. The s
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
ipc.of.world.on(
|
ipc.of.world.on(
|
||||||
'message',
|
'message', //any event or message type your server listens for
|
||||||
function(data){
|
function(data){
|
||||||
ipc.log('got a message from world : '.debug, data);
|
ipc.log('got a message from world : '.debug, data);
|
||||||
}
|
}
|
||||||
|
@ -549,8 +568,6 @@ This is the most basic example which will work for both local and remote UDP Soc
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -588,8 +605,6 @@ This is the most basic example which will work for both local and remote UDP Soc
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -45,7 +45,7 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
|
|
||||||
ipc.server.define.broadcast['kill.connection']='This event is a command to kill connection to this server, the data object will contain the id of this server incase the client needs it';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -33,6 +33,4 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
46
example/TCPSocket/basicSync/hello-client.js
Normal file
46
example/TCPSocket/basicSync/hello-client.js
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'hello';
|
||||||
|
ipc.config.retry= 1500;
|
||||||
|
ipc.config.sync= true;
|
||||||
|
|
||||||
|
ipc.connectToNet(
|
||||||
|
'world',
|
||||||
|
function(){
|
||||||
|
ipc.of.world.on(
|
||||||
|
'connect',
|
||||||
|
function(){
|
||||||
|
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
|
||||||
|
|
||||||
|
//queue up a bunch of requests to be sent synchronously
|
||||||
|
for(var i=0; i<10; i++){
|
||||||
|
ipc.of.world.emit(
|
||||||
|
'message',
|
||||||
|
'hello'+i
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'disconnect',
|
||||||
|
function(){
|
||||||
|
ipc.log('disconnected from world'.notice);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'message',
|
||||||
|
function(data){
|
||||||
|
ipc.log('got a message from world : '.debug, data,'\n\n');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(ipc)
|
45
example/TCPSocket/basicSync/world-server.js
Normal file
45
example/TCPSocket/basicSync/world-server.js
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'world';
|
||||||
|
ipc.config.retry= 1500;
|
||||||
|
ipc.config.sync = true;
|
||||||
|
|
||||||
|
ipc.serveNet(
|
||||||
|
function(){
|
||||||
|
ipc.server.on(
|
||||||
|
'message',
|
||||||
|
function(data,socket){
|
||||||
|
ipc.log('got a message : '.debug, data);
|
||||||
|
//fake some synch procedural code
|
||||||
|
setTimeout(
|
||||||
|
function(){
|
||||||
|
ipc.server.emit(
|
||||||
|
socket,
|
||||||
|
'message',
|
||||||
|
data+' world!'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
3000
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
ipc.server.on(
|
||||||
|
'socket.disconnected',
|
||||||
|
function(data,socket){
|
||||||
|
console.log(arguments)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ipc.server.start();
|
|
@ -49,7 +49,7 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
|
|
||||||
ipc.server.define.broadcast['kill.connection']='This event is a command to kill connection to this server, the data object will contain the id of this server incase the client needs it';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -37,6 +37,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -43,6 +43,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -44,6 +44,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -37,6 +37,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
47
example/TLSSocket/basicSync/hello-client.js
Normal file
47
example/TLSSocket/basicSync/hello-client.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'hello';
|
||||||
|
ipc.config.retry= 1500;
|
||||||
|
ipc.config.sync= true;
|
||||||
|
ipc.config.tls={
|
||||||
|
rejectUnauthorized:false
|
||||||
|
};
|
||||||
|
|
||||||
|
ipc.connectToNet(
|
||||||
|
'world',
|
||||||
|
function(){
|
||||||
|
ipc.of.world.on(
|
||||||
|
'connect',
|
||||||
|
function(){
|
||||||
|
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
|
||||||
|
|
||||||
|
//queue up a bunch of requests to be sent synchronously
|
||||||
|
for(var i=0; i<10; i++){
|
||||||
|
ipc.of.world.emit(
|
||||||
|
'message',
|
||||||
|
'hello'+i
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'disconnect',
|
||||||
|
function(){
|
||||||
|
ipc.log('disconnected from world'.notice);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'message',
|
||||||
|
function(data){
|
||||||
|
ipc.log('got a message from world : '.debug, data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
48
example/TLSSocket/basicSync/world-server.js
Normal file
48
example/TLSSocket/basicSync/world-server.js
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'world';
|
||||||
|
ipc.config.retry= 1500;
|
||||||
|
ipc.config.sync= true;
|
||||||
|
ipc.config.tls={
|
||||||
|
public: '../../../local-node-ipc-certs/server.pub',
|
||||||
|
private: '../../../local-node-ipc-certs/private/server.key'
|
||||||
|
}
|
||||||
|
|
||||||
|
ipc.serveNet(
|
||||||
|
function(){
|
||||||
|
ipc.server.on(
|
||||||
|
'message',
|
||||||
|
function(data,socket){
|
||||||
|
ipc.log('got a message : '.debug, data);
|
||||||
|
setTimeout(
|
||||||
|
function(){
|
||||||
|
ipc.server.emit(
|
||||||
|
socket,
|
||||||
|
'message',
|
||||||
|
data+' world!'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
3000
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
ipc.server.on(
|
||||||
|
'socket.disconnected',
|
||||||
|
function(data,socket){
|
||||||
|
console.log(arguments)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ipc.server.start();
|
|
@ -43,6 +43,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
|
@ -43,6 +43,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
|
@ -58,6 +58,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
|
@ -47,6 +47,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
|
@ -43,6 +43,6 @@ ipc.serveNet(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
|
@ -45,7 +45,7 @@ ipc.serve(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
|
|
||||||
ipc.server.define.broadcast['kill.connection']='This event is a command to kill connection to this server, the data object will contain the id of this server incase the client needs it';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
|
@ -29,6 +29,6 @@ ipc.serve(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
|
|
||||||
|
|
||||||
ipc.server.start();
|
ipc.server.start();
|
||||||
|
|
49
example/unixWindowsSocket/basicSync/hello-client.js
Normal file
49
example/unixWindowsSocket/basicSync/hello-client.js
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'hello';
|
||||||
|
ipc.config.retry = 1000;
|
||||||
|
ipc.config.sync= true;
|
||||||
|
|
||||||
|
ipc.connectTo(
|
||||||
|
'world',
|
||||||
|
function(){
|
||||||
|
ipc.of.world.on(
|
||||||
|
'connect',
|
||||||
|
function(){
|
||||||
|
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
|
||||||
|
|
||||||
|
//queue up a bunch of requests to be sent synchronously
|
||||||
|
for(var i=0; i<10; i++){
|
||||||
|
ipc.of.world.emit(
|
||||||
|
'app.message',
|
||||||
|
{
|
||||||
|
id : ipc.config.id,
|
||||||
|
message : 'hello'+i
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'disconnect',
|
||||||
|
function(){
|
||||||
|
ipc.log('disconnected from world'.notice);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
ipc.of.world.on(
|
||||||
|
'app.message',
|
||||||
|
function(data){
|
||||||
|
ipc.log('got a message from world : '.debug, data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(ipc.of.world.destroy);
|
||||||
|
}
|
||||||
|
);
|
41
example/unixWindowsSocket/basicSync/world-server.js
Normal file
41
example/unixWindowsSocket/basicSync/world-server.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
var ipc=require('../../../node-ipc');
|
||||||
|
|
||||||
|
/***************************************\
|
||||||
|
*
|
||||||
|
* You should start both hello and world
|
||||||
|
* then you will see them communicating.
|
||||||
|
*
|
||||||
|
* *************************************/
|
||||||
|
|
||||||
|
ipc.config.id = 'world';
|
||||||
|
ipc.config.retry= 1500;
|
||||||
|
ipc.config.sync= true;
|
||||||
|
|
||||||
|
ipc.serve(
|
||||||
|
function(){
|
||||||
|
ipc.server.on(
|
||||||
|
'app.message',
|
||||||
|
function(data,socket){
|
||||||
|
//ipc.log('got a message from'.debug, (data.id).variable, (data.message).data);
|
||||||
|
|
||||||
|
setTimeout(
|
||||||
|
function(){
|
||||||
|
ipc.server.emit(
|
||||||
|
socket,
|
||||||
|
'app.message',
|
||||||
|
{
|
||||||
|
id : ipc.config.id,
|
||||||
|
message : data.message+' world!'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
2000
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ipc.server.start();
|
|
@ -3,11 +3,13 @@ var net = require('net'),
|
||||||
eventParser = require('../lib/eventParser.js'),
|
eventParser = require('../lib/eventParser.js'),
|
||||||
pubsub = require('event-pubsub'),
|
pubsub = require('event-pubsub'),
|
||||||
Message = require('js-message'),
|
Message = require('js-message'),
|
||||||
fs = require('fs');
|
fs = require('fs'),
|
||||||
|
Queue = require('js-queue');
|
||||||
|
|
||||||
function init(config,log){
|
function init(config,log){
|
||||||
var client={
|
var client={
|
||||||
config : config,
|
config : config,
|
||||||
|
queue : new Queue,
|
||||||
socket : false,
|
socket : false,
|
||||||
connect : connect,
|
connect : connect,
|
||||||
emit : emit,
|
emit : emit,
|
||||||
|
@ -32,9 +34,21 @@ function emit(type,data){
|
||||||
message=eventParser.format(message);
|
message=eventParser.format(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!this.config.sync){
|
||||||
this.socket.write(message);
|
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(){
|
function connect(){
|
||||||
//init client object for scope persistance especially inside of socket events.
|
//init client object for scope persistance especially inside of socket events.
|
||||||
var client=this;
|
var client=this;
|
||||||
|
@ -176,6 +190,11 @@ function connect(){
|
||||||
'data',
|
'data',
|
||||||
new Buffer(data,this.encoding)
|
new Buffer(data,this.encoding)
|
||||||
);
|
);
|
||||||
|
if(!client.config.sync){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
client.queue.next();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,6 +222,12 @@ function connect(){
|
||||||
message.data
|
message.data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!client.config.sync){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
client.queue.next();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,16 +72,6 @@ function init(path,config,log,port){
|
||||||
sockets : [],
|
sockets : [],
|
||||||
emit : emit,
|
emit : emit,
|
||||||
broadcast : broadcast,
|
broadcast : broadcast,
|
||||||
define : {
|
|
||||||
listen : {
|
|
||||||
'get.events.broadcasting' : 'does not require any special paramaters',
|
|
||||||
'get.events.listening' : 'does not require any special paramaters'
|
|
||||||
},
|
|
||||||
broadcast : {
|
|
||||||
'events.broadcasting' : 'data.events is a JSON object of event definitions by type '+config.id+' will broadcast on '+path,
|
|
||||||
'events.listening' : 'data.events is a JSON object of event definitions by type '+config.id+' is listening for on '+path
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onStart : function(socket){
|
onStart : function(socket){
|
||||||
this.trigger(
|
this.trigger(
|
||||||
'start',
|
'start',
|
||||||
|
@ -266,16 +256,6 @@ function init(path,config,log,port){
|
||||||
if(server.config.rawBuffer){
|
if(server.config.rawBuffer){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
server.trigger(
|
|
||||||
'get.events.broadcasting',
|
|
||||||
socket
|
|
||||||
);
|
|
||||||
|
|
||||||
server.trigger(
|
|
||||||
'get.events.listening',
|
|
||||||
socket
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function started(socket){
|
function started(socket){
|
||||||
|
@ -330,34 +310,6 @@ function init(path,config,log,port){
|
||||||
|
|
||||||
new pubsub(server);
|
new pubsub(server);
|
||||||
|
|
||||||
server.on(
|
|
||||||
'get.events.broadcasting',
|
|
||||||
function(socket){
|
|
||||||
server.emit(
|
|
||||||
socket,
|
|
||||||
'events.broadcasting',
|
|
||||||
{
|
|
||||||
id : server.config.id,
|
|
||||||
events : server.define.broadcast
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
server.on(
|
|
||||||
'get.events.listening',
|
|
||||||
function(socket){
|
|
||||||
server.emit(
|
|
||||||
socket,
|
|
||||||
'events.listening',
|
|
||||||
{
|
|
||||||
id : server.config.id,
|
|
||||||
events : server.define.listen,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
server.on(
|
server.on(
|
||||||
'close',
|
'close',
|
||||||
function(){
|
function(){
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIID1jCCAr4CCQCWhOpk8haFZDANBgkqhkiG9w0BAQsFADCBrDELMAkGA1UEBhMC
|
MIID3TCCAsWgAwIBAgIJAOmDsVuaIt0SMA0GCSqGSIb3DQEBCwUAMIGEMQswCQYD
|
||||||
VVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1UaG91c2FuZCBPYWtzMRMwEQYDVQQK
|
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBwwCTEExEDAOBgNV
|
||||||
DApkaWdpbm93Lml0MSAwHgYDVQQLDBdPcGVuIHNvdXJjZSBkZXZlbG9wbWVudDEe
|
BAoMB2RpZ2lub3cxDDAKBgNVBAsMA3JuZDEQMA4GA1UEAwwHZGlnaW5vdzEhMB8G
|
||||||
MBwGA1UEAwwVQnJhbmRvbiBOb3pha2kgTWlsbGVyMSEwHwYJKoZIhvcNAQkBFhJi
|
CSqGSIb3DQEJARYSYnJhbmRvbkBkaWdpbm93Lml0MB4XDTE1MTIyMjE5NDcxNVoX
|
||||||
cmFuZG9uQGRpZ2lub3cuaXQwHhcNMTUwOTI3MjAwNjQ1WhcNMTUxMDI3MjAwNjQ1
|
DTE2MTIyMTE5NDcxNVowgYQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y
|
||||||
WjCBrDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1UaG91c2Fu
|
bmlhMQswCQYD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npbZWcqy273tKOdV6uOG93rQX
|
||||||
e1qTG/hyjwjHXPH/K68q2J7HNDIZjY2BM4vbC/REMszcP/zL4jCXEPGO4WLdGCs9
|
6Ez6yxuBepSdwP716CT7o8EaSPBy+QjDH/e2qI3rIUHzfPwAwf4kGbNa6relTCVR
|
||||||
+fDXcu0ObBzTgL0HJ5bqhcybhRy6w5dQoSviOjSYkuJSp8+AXSV7
|
fLrzEICSbFZKST/zeKvrY0ACOCIn8b6LiiP7GJfnV8bvvpTWXyil
|
||||||
-----END RSA PRIVATE KEY-----
|
-----END RSA PRIVATE KEY-----
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
-----BEGIN DH PARAMETERS-----
|
-----BEGIN DH PARAMETERS-----
|
||||||
MIIBCAKCAQEAqMIoOYH2rh4xZg8WaUo13fNetYxnqmh7xLmozkDHSEcKsBcCtlxJ
|
MIIBCAKCAQEAhDA93df5Qa7pMWiqJ8IeCDw4fCIJCNbzRklS2saOeQRkUY/kPy07
|
||||||
if1vKRMfa6z4gT7mS2VaFOMkXPlwDxpnr4CAcfXcy8rSrpItTxlGrNVZRSd24HvH
|
EByFWUDNtgtWRx7YndJKwyFepHXxI3P0DDuSPYKq/bfiWDr/cUmTBJcpPmg6w/SU
|
||||||
IxXIPvaFwQWqXBvtxFwFRrMZOo+KICqKM3KsqJbz6DWtum/dKpGO/dtcQq2ZPWe1
|
ReOB6vORXyF9iytyLCKk1Pyo2nXOdpADcTflhi+zxTSpGLtPAU2XIYENtmC4HKJm
|
||||||
Dmb/yS4lqEngU/td6tZ558IjQgFnXC0zjquxrxy/LorBW751wiVzOGAjj/4ybdIx
|
y6nbSIbe4BA74bxyqzp6RVuMvyHAgCjPDwvHlp5UV1Mjtr1aNqgzpLQSjK4VwiJ+
|
||||||
GuO1UEcps+18ealGEThHjDZwC5w69Zo+82Ned2Vl8nqk0klaJv+5CaOhmNmTR3Sj
|
DZ48/1D9IYksDl8NWJopFpudyPD1WFou/CZ6PYsjprFrTKVPqoFD5Zj6zPey9C70
|
||||||
PDD7nFgCnBQ9UHde6j6DnytNMJRkrk3ucwIBAg==
|
Go0uHRNPr9UrhwCqDEKNszulME8heSVSQwIBAg==
|
||||||
-----END DH PARAMETERS-----
|
-----END DH PARAMETERS-----
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIIEpAIBAAKCAQEAoIAKszKHSLHzNPSrI/unpfhMYqBz5V8u+31uY02l2YSt+xgU
|
MIIEogIBAAKCAQEAyHKCBWzkf58gKkqRIBjJR8cSXlsiuOuirlbBQ1K+recVbh2b
|
||||||
s7tiv3pD3Q0b9B7AyeQQXCPqSoo7HK3nUkrafWBLXVBZwpVnZtLleXTPwB1xZXP2
|
MdDoqBCk3ibeGw4p/smOxJiH/9rxpcCQ0XrSeNGasLxGB8RcNgenRFonyBPmTAjS
|
||||||
LJMCTxKIN0EbThU4K+PaMgzLq6pr8uOZpzxlJPHMH7W8Nf+8tlNa4WveuP2gDXvr
|
O85Aa74g8CUBXaYSgk0hMWQNxkkHecGuu9F6LtN5TM7XG6Td7OTRB+bDEGdwfny4
|
||||||
k+hVNL68Dctt0Tl9BKsMNyOPdrOKbgFO7vTo5jI/GoIaQpfVYitazUBOiGY+7tNp
|
bqc2ELUsj99CVNxSNc5h0dJE9M6ejvIjdRQFFtfNKGgT3O7inEdDSpPZfeM+JmTB
|
||||||
En+0i+dNorotNT1C5nRRkg7XsQkXzHuuf6CExZ+ckYycg1KDhEAMGE2GLUoJ1ayP
|
r/vz2jnHaSsD7d9hWKYo7Kp74rL0QJSH97ugb+g8kDAkqV1bQaVdzp+nC74/GbVL
|
||||||
7ioHwxqXZBRCPpuFGx/d0WSwnTIDMpi87PqdUQIDAQABAoIBACCBbilWzXFaoPAT
|
B9E+YH+zzvs2x9nLYPJHknia5KRfOmRjPnCdVwIDAQABAoIBACdNXHUX3s2vM61X
|
||||||
sWmLOSvy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ATrXqyFyIulTvfIzw6nGrYYJCHGD2OdioJzobhEC7c2myAM
|
||||||
JEdv7QKBgQCiuS/161OJDO4VQ5tNUErTLvsBBqFqXe3JXCbaMw97hAurh8zCwCye
|
zgTVAoGADfGqbgq8wSv+nLtOnY+s5ajwMVAyld/JqDXm5829CTI/Kd1ch6BxWYZr
|
||||||
x/bI8pNp3JgIQmUd784x7BcyzRPV8Nfr1UylKikgcALiojQRRqOpNTNh2yITcxHA
|
V06PY9mJ8k39GAOab7YWcKX90E85cN7YMSjsQhdMgVAsBCv25eot4BWc8EO8WeCJ
|
||||||
dEvO61W2kh+uOFVoUc6TSyqyjaG0p1u+qcqJ8JWdr1FfR8vD6bzp4Q==
|
76aC7LlmX9WlHqaZV/GNcj3PhKao5mIk77BKySxINRaflRiCWjI=
|
||||||
-----END RSA PRIVATE KEY-----
|
-----END RSA PRIVATE KEY-----
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIEETCCAvmgAwIBAgIJAK9UFY6LVBSZMA0GCSqGSIb3DQEBCwUAMIGeMQswCQYD
|
MIID3TCCAsWgAwIBAgIJAICSLj3FNe/DMA0GCSqGSIb3DQEBCwUAMIGEMQswCQYD
|
||||||
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNVGhvdXNhbmQg
|
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBwwCTEExEDAOBgNV
|
||||||
T2FrczEVMBMGA1UECgwMRGlnaU5vdyBJbmMuMRQwEgYDVQQLDAtkZXZlbG9wbWVu
|
BAoMB2RpZ2lub3cxDDAKBgNVBAsMA3JuZDEQMA4GA1UEAwwHZGlnaW5vdzEhMB8G
|
||||||
dDESMBAGA1UEAwwJbG9jYWxob3N0MSEwHwYJKoZIhvcNAQkBFhJicmFuZG9uQGRp
|
CSqGSIb3DQEJARYSYnJhbmRvb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LW77QWAXTiYrgWBnHHiDVJb0+iPdJ4t4tjTsQPbcClHPEXvsuAtODuZg
|
zAz+aHk7XB+nLb3Ts1IlwM3i1lwi3ft3Rlvgg3CDhff4CcyaKJbYu286qMeKyifk
|
||||||
N+pkRw5BuVbyC30B+Sa1DXz5l2XU2/lGfsQ91bAedqju7vQCOJvbDlGC+bMZP2hO
|
316Y5DCosYoAsPkQeWHJdvwBUPzAqtkxGlAW9eSQSBJt
|
||||||
wDnoFyWYjkaI4/u2L1J28MNDp627er2OvwJTph2++tWcvBI9tg==
|
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
|
|
@ -31,6 +31,7 @@ var defaults={
|
||||||
id : os.hostname(),
|
id : os.hostname(),
|
||||||
encoding : 'utf8',
|
encoding : 'utf8',
|
||||||
rawBuffer : false,
|
rawBuffer : false,
|
||||||
|
sync : false,
|
||||||
silent : false,
|
silent : false,
|
||||||
maxConnections : 100,
|
maxConnections : 100,
|
||||||
retry : 500,
|
retry : 500,
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
{
|
{
|
||||||
"name": "node-ipc",
|
"name": "node-ipc",
|
||||||
"version": "4.1.0",
|
"version": "5.0.0",
|
||||||
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
|
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
|
||||||
"main": "node-ipc.js",
|
"main": "node-ipc.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"example": "example"
|
"example": "example"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=1.0.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": "*",
|
"colors": "*",
|
||||||
"event-pubsub": "*",
|
"event-pubsub": "*",
|
||||||
"js-message": "*",
|
"js-message": "*",
|
||||||
|
"js-queue": "^0.1.2",
|
||||||
"node-cmd": "*"
|
"node-cmd": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
|
|
Loading…
Reference in a new issue