Merge branch 'master' into fix-165

This commit is contained in:
Brandon Nozaki Miller 2019-12-02 00:57:26 -08:00 committed by GitHub
commit 7469dbac01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -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 |
----

View file

@ -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);