forked from downwa/ar2dscript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworld-server.js
More file actions
35 lines (29 loc) · 748 Bytes
/
Copy pathworld-server.js
File metadata and controls
35 lines (29 loc) · 748 Bytes
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
const ipc=require('node-ipc');
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'worldtest';
ipc.config.retry= 1500;
//ipc.config.silent=true;
ipc.serve(
function(){
ipc.server.on(
'app.message',
function(data,socket){
console.log("data=",data);
ipc.server.emit(
socket,
'app.message',
{
id : ipc.config.id,
message : data.message+' world!'
}
);
}
);
}
);
ipc.server.start();