added server.stop fixes #2

This commit is contained in:
Brandon Nozaki Miller 2016-01-04 01:33:55 -08:00
parent a8ea63eca6
commit ae5685fd19
2 changed files with 11 additions and 0 deletions

View file

@ -441,6 +441,14 @@ or specifying everything UDP
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the `ipc.connectTo` or `iupc.connectToNet`. They will be stored based on the ID used to create them, eg : ipc.of.mySocket| | ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the `ipc.connectTo` or `iupc.connectToNet`. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
| ipc.server| This is a refrence to the server created by `ipc.serve` or `ipc.serveNet`| | ipc.server| This is a refrence to the server created by `ipc.serve` or `ipc.serveNet`|
----
### IPC Server Methods
| method | definition |
|-----------|------------|
|start| start serving need top call ` serve ` or ` serveNet ` first to set up the server |
|stop| close the server and stop serving |
---- ----
### IPC Events ### IPC Events

View file

@ -78,6 +78,9 @@ function init(path,config,log,port){
socket socket
); );
}, },
stop:function(){
server.server.close();
},
start : function(){ start : function(){
if(!this.path){ if(!this.path){
server.log('Socket Server Path not specified, refusing to start'.warn); server.log('Socket Server Path not specified, refusing to start'.warn);