Skip to content

Commit 5edf1f4

Browse files
jugglinmikelpinca
authored andcommitted
[doc] Clarify interpretation of verifyClient (#1994)
Prior to this commit, the documentation for the `verifyClient` option was somewhat confusing due to its use of the passive voice and an uncommon interpretation of the term "arguments". Explain the way `ws` interprets the value of `verifyClient` using an active voice and more traditional meanings of "parameters" and "arguments".
1 parent 00c34d7 commit 5edf1f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/ws.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ to share a single HTTP/S server between multiple WebSocket servers.
9999
> more details.
100100
101101
If `verifyClient` is not set then the handshake is automatically accepted. If it
102-
is provided with a single argument then that is:
102+
has a single parameter then `ws` will invoke it with the following argument:
103103

104104
- `info` {Object}
105105
- `origin` {String} The value in the Origin header indicated by the client.
@@ -110,7 +110,8 @@ is provided with a single argument then that is:
110110
The return value (`Boolean`) of the function determines whether or not to accept
111111
the handshake.
112112

113-
if `verifyClient` is provided with two arguments then those are:
113+
If `verifyClient` has two parameters then `ws` will invoke it with the following
114+
arguments:
114115

115116
- `info` {Object} Same as above.
116117
- `cb` {Function} A callback that must be called by the user upon inspection of

0 commit comments

Comments
 (0)