Skip to content

Commit

Permalink
Make it clear that the callback is only called when you supply the co…
Browse files Browse the repository at this point in the history
…nstructor with

a port number. Callbacks do not make sense if you supply it with a server as you will
be the one that does `server.listen(port, [cb])`.
  • Loading branch information
3rd-Eden committed Apr 11, 2013
1 parent 7dd06c0 commit dce4634
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/ws.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ This class is a WebSocket server. It is an `EventEmitter`.

Construct a new server object.

Either `port` or `server` must be provided, otherwise you might enable `noServer` if you want to pass the requests directly.
Either `port` or `server` must be provided, otherwise you might enable
`noServer` if you want to pass the requests directly. Please note that the
`callback` is only used when you supply the a `port` number in the options.

### server.close([code], [data])

Expand Down

0 comments on commit dce4634

Please sign in to comment.