Permalink
Browse files

Improve Close documentation

  • Loading branch information...
1 parent 4b89bce commit 1f7da938bd69cdb6524d196fe4e71a8efdec8df1 Narciso Guillen committed Jun 30, 2014
Showing with 6 additions and 4 deletions.
  1. +6 −4 Readme.md
View
@@ -190,15 +190,17 @@ server.listen(3000);
Closes socket server
```js
- var io = require('socket.io');
+ var io = require('socket.io');
+ var PORT = 3030;
+ var server = require('http').Server();
- io(3030);
+ io(PORT);
io.close(); // Close current server
- var srv = require('http').createServer(3030);
- io(srv);
+ server.listen(PORT); // PORT is free to use
+ io(server);
```
### Server#use

0 comments on commit 1f7da93

Please sign in to comment.