diff --git a/README.md b/README.md index 8398681..b3f33ba 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Set these variables in the `ipc.config` scope to overwrite or set default values | variable | documentation | |----------|---------------| -| appspace | used for Unix Socket (Unix Domain Socket) namespacing. If not set specifically, the Unix Domain Socket will combine the socketRoot, appspace, and id to form the Unix Socket Path for creation or binding. This is available incase you have many apps running on your system, you may have several sockets with the same id, but if you change the appspace, you will still have app specic unique sockets.| +| appspace | used for Unix Socket (Unix Domain Socket) namespacing. If not set specifically, the Unix Domain Socket will combine the socketRoot, appspace, and id to form the Unix Socket Path for creation or binding. This is available in case you have many apps running on your system, you may have several sockets with the same id, but if you change the appspace, you will still have app specic unique sockets.| | socketRoot| the directory in which to create or bind to a Unix Socket | | id | the id of this socket or service | | networkHost| the local or remote host on which TCP, TLS or UDP Sockets should connect | @@ -464,7 +464,7 @@ or specifying everything UDP | method | definition | |-----------|------------| -|start| start serving need top call ` serve ` or ` serveNet ` first to set up the server | +|start| start serving need to call ` serve ` or ` serveNet ` first to set up the server | |stop| close the server and stop serving | ---- diff --git a/dao/socketServer.js b/dao/socketServer.js index 742cf4d..b330654 100644 --- a/dao/socketServer.js +++ b/dao/socketServer.js @@ -161,18 +161,18 @@ function gotData(socket,data,UDPSocket){ return; } - if(!this.ipcBuffer){ - this.ipcBuffer=''; + if(!sock.ipcBuffer){ + sock.ipcBuffer=''; } - data=(this.ipcBuffer+=data); + data=(sock.ipcBuffer+=data); if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){ this.log('Messages are large, You may want to consider smaller messages.'); return; } - this.ipcBuffer=''; + sock.ipcBuffer=''; data=eventParser.parse(data);