Merge pull request #31 from robatron/patch-1

Basic examples corrections
This commit is contained in:
Brandon Nozaki Miller 2015-05-04 14:56:49 -07:00
commit 21707286db

View file

@ -353,6 +353,7 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
function(data,socket){ function(data,socket){
ipc.log('got a message : '.debug, data); ipc.log('got a message : '.debug, data);
ipc.server.emit( ipc.server.emit(
socket,
'message', 'message',
data+' world!' data+' world!'
); );
@ -366,7 +367,7 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
#### Client for Unix Sockets & TCP Sockets #### Client for Unix Sockets & TCP Sockets
The client connects to the servers socket for Inter Process Communication. The socket will recieve events emitted to it specifically as well as events which are broadcast out on the socket by the server. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets. The client connects to the servers socket for Inter Process Communication. The socket will recieve events emitted to it specifically as well as events which are broadcast out on the socket by the server. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
var ipc=require('../../../node-ipc'); var ipc=require('node-ipc');
ipc.config.id = 'hello'; ipc.config.id = 'hello';
ipc.config.retry= 1500; ipc.config.retry= 1500;