Merge branch 'master' of github.com:RIAEvangelist/node-ipc

This commit is contained in:
SSMP 2016-09-30 06:11:01 -07:00
commit 825e16fcba

View file

@ -453,7 +453,8 @@ or specifying everything UDP
|----------|------|----------|
|error|err obj|triggered when an error has occured|
|connect||triggered when socket connected|
|disconnect||triggered when socket disconnected|
|disconnect||triggered by client when socket has disconnected from server|
|socket.disconnected|socket destroyedSocketID|triggered by server when a client socket has 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}} ` |
@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
);
}
);
ipc.server.on(
'socket.disconnected',
function(socket, destroyedSocketID) {
ipc.log('client ' + destroyedSocketID + ' has disconnected!');
}
);
}
);