From c4578386ed82fc94aadf53fa1d3f49b28c17c1f4 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:10:21 +0300 Subject: [PATCH 01/12] Added 'socket.disconnect' to event list in docs - Also added a listener in the Basic Examples --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..a920568 100644 --- a/README.md +++ b/README.md @@ -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 on client when socket disconnected| +|socket.disconnect||triggered on server when a client 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}} ` | @@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); + ipc.server.on( + 'socket.disconnect', + function(socket, socketID) { + ipc.log('client ' + socketID + ' disconnected from me!') + } + ); } ); From dcde4b69fb3611b9644631be4a2c059e7f4e875b Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:17:38 +0300 Subject: [PATCH 02/12] wrong branch --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index a920568..e925d78 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,7 @@ or specifying everything UDP |----------|------|----------| |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| -|disconnect||triggered on client when socket disconnected| -|socket.disconnect||triggered on server when a client socket disconnected| +|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}} ` | @@ -520,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); - ipc.server.on( - 'socket.disconnect', - function(socket, socketID) { - ipc.log('client ' + socketID + ' disconnected from me!') - } - ); } ); From 2f5cfe1f0ad22e4564a635f0220bac8b8c46dec1 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:26:24 +0300 Subject: [PATCH 03/12] wat --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..a920568 100644 --- a/README.md +++ b/README.md @@ -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 on client when socket disconnected| +|socket.disconnect||triggered on server when a client 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}} ` | @@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); + ipc.server.on( + 'socket.disconnect', + function(socket, socketID) { + ipc.log('client ' + socketID + ' disconnected from me!') + } + ); } ); From c3ec2f1c86dc0a755d784196cfd7f9e51f6fc7a6 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:26:46 +0300 Subject: [PATCH 04/12] evert "Added 'socket.disconnect' to event list in docs" sTihis reverts commit c4578386ed82fc94aadf53fa1d3f49b28c17c1f4. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index a920568..e925d78 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,7 @@ or specifying everything UDP |----------|------|----------| |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| -|disconnect||triggered on client when socket disconnected| -|socket.disconnect||triggered on server when a client socket disconnected| +|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}} ` | @@ -520,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); - ipc.server.on( - 'socket.disconnect', - function(socket, socketID) { - ipc.log('client ' + socketID + ' disconnected from me!') - } - ); } ); From 11f262418d3b15911e9a731257d4b31043ff2483 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:27:56 +0300 Subject: [PATCH 05/12] Revert "evert "Added 'socket.disconnect' to event list in docs"" This reverts commit c3ec2f1c86dc0a755d784196cfd7f9e51f6fc7a6. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..a920568 100644 --- a/README.md +++ b/README.md @@ -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 on client when socket disconnected| +|socket.disconnect||triggered on server when a client 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}} ` | @@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); + ipc.server.on( + 'socket.disconnect', + function(socket, socketID) { + ipc.log('client ' + socketID + ' disconnected from me!') + } + ); } ); From 234a3fa16e50c28cab52d2efbe15aeee081de9b0 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:30:01 +0300 Subject: [PATCH 06/12] Revert "Added 'socket.disconnect' to event list in docs" This reverts commit c4578386ed82fc94aadf53fa1d3f49b28c17c1f4. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index a920568..e925d78 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,7 @@ or specifying everything UDP |----------|------|----------| |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| -|disconnect||triggered on client when socket disconnected| -|socket.disconnect||triggered on server when a client socket disconnected| +|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}} ` | @@ -520,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); - ipc.server.on( - 'socket.disconnect', - function(socket, socketID) { - ipc.log('client ' + socketID + ' disconnected from me!') - } - ); } ); From 576114ee8344477771d6c7413a4eda2c01f4995c Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:30:07 +0300 Subject: [PATCH 07/12] Revert "wrong branch" This reverts commit dcde4b69fb3611b9644631be4a2c059e7f4e875b. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..a920568 100644 --- a/README.md +++ b/README.md @@ -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 on client when socket disconnected| +|socket.disconnect||triggered on server when a client 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}} ` | @@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); + ipc.server.on( + 'socket.disconnect', + function(socket, socketID) { + ipc.log('client ' + socketID + ' disconnected from me!') + } + ); } ); From 19329fb8bde6f229b0ba957fbe7a632c88b9109c Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:30:11 +0300 Subject: [PATCH 08/12] Revert "wat" This reverts commit 2f5cfe1f0ad22e4564a635f0220bac8b8c46dec1. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index a920568..e925d78 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,7 @@ or specifying everything UDP |----------|------|----------| |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| -|disconnect||triggered on client when socket disconnected| -|socket.disconnect||triggered on server when a client socket disconnected| +|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}} ` | @@ -520,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); - ipc.server.on( - 'socket.disconnect', - function(socket, socketID) { - ipc.log('client ' + socketID + ' disconnected from me!') - } - ); } ); From 1d7617386514ed8c096ac158f0b82248959af537 Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:30:15 +0300 Subject: [PATCH 09/12] Revert "evert "Added 'socket.disconnect' to event list in docs"" This reverts commit c3ec2f1c86dc0a755d784196cfd7f9e51f6fc7a6. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..a920568 100644 --- a/README.md +++ b/README.md @@ -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 on client when socket disconnected| +|socket.disconnect||triggered on server when a client 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}} ` | @@ -519,6 +520,12 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); + ipc.server.on( + 'socket.disconnect', + function(socket, socketID) { + ipc.log('client ' + socketID + ' disconnected from me!') + } + ); } ); From ae5cf39375124bd1db872d9be56912132b9ca7ab Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:30:17 +0300 Subject: [PATCH 10/12] Revert "Revert "evert "Added 'socket.disconnect' to event list in docs""" This reverts commit 11f262418d3b15911e9a731257d4b31043ff2483. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index a920568..e925d78 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,7 @@ or specifying everything UDP |----------|------|----------| |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| -|disconnect||triggered on client when socket disconnected| -|socket.disconnect||triggered on server when a client socket disconnected| +|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}} ` | @@ -520,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co ); } ); - ipc.server.on( - 'socket.disconnect', - function(socket, socketID) { - ipc.log('client ' + socketID + ' disconnected from me!') - } - ); } ); From fbed93b8d9b65acee748f8f5a9b45aca1b045eac Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:34:44 +0300 Subject: [PATCH 11/12] added socket.disconnected to docs --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e925d78..81d674d 100644 --- a/README.md +++ b/README.md @@ -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||trigger 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!'); + } + ); } ); From 8b712f4da86f7837dc43c34b225c69704a85d28d Mon Sep 17 00:00:00 2001 From: Stealthmate Date: Tue, 13 Sep 2016 20:36:11 +0300 Subject: [PATCH 12/12] fixed formatting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81d674d..079e817 100644 --- a/README.md +++ b/README.md @@ -454,7 +454,7 @@ or specifying everything UDP |error|err obj|triggered when an error has occured| |connect||triggered when socket connected| |disconnect||triggered by client when socket has disconnected from server| -|socket.disconnected||socket destroyedSocketID||trigger by server when a client socket has disconnected| +|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}} ` |