diff --git a/README.md b/README.md index e398916..eddf091 100644 --- a/README.md +++ b/README.md @@ -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.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 diff --git a/lib/socketServer.js b/lib/socketServer.js index 94130b0..a4c1163 100644 --- a/lib/socketServer.js +++ b/lib/socketServer.js @@ -78,6 +78,9 @@ function init(path,config,log,port){ socket ); }, + stop:function(){ + server.server.close(); + }, start : function(){ if(!this.path){ server.log('Socket Server Path not specified, refusing to start'.warn);