You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,8 @@ Returns a new `Connection` object, representing a websocket client connection
47
47
48
48
`options` is an object that will be passed to net.connect() (or tls.connect() if the protocol is "wss:").
49
49
The properties "host" and "port" will be read from the `URL`.
50
-
The property `extraHeaders` will be used to add more headers to the HTTP handshake request.
50
+
The optional property `extraHeaders` will be used to add more headers to the HTTP handshake request. If present, it must be an object, like `{'X-My-Header': 'value'}`.
51
+
The optional property `protocols` will be used in the handshake (as "Sec-WebSocket-Protocol" header) to allow the server to choose one of those values. If present, it must be an array of strings.
0 commit comments