This will include the port number if a non-standard port is used
A reference to the original Node HTTP request object
Sec-WebSocket-Key
If the client is a web browser, origin will be a string containing the URL
of the page containing the script that opened the connection.
If the client is not a web browser, origin may be null
or "*".
string
Client's IP. If an X-Forwarded-For
header is present, the value will be taken
from that header to facilitate WebSocket servers that live behind a reverse-proxy
An array containing a list of extensions requested by the client
List of strings that indicate the subprotocols the client would like to speak.
The server should select the best one that it can support from the list and
pass it to the accept
function when accepting the connection.
Note that all the strings in the requestedProtocols
array will have been
converted to lower case.
A string containing the path that was requested by the client
Parsed resource, including the query string parameters
The version of the WebSocket protocol requested by the client
After inspecting the request
properties, call this function on the
request object to accept the connection. If you don't have a particular subprotocol
you wish to speak, you may pass null
for the acceptedProtocol
parameter.
boolean
Array<Function>
Reject connection.
You may optionally pass in an HTTP Status code (such as 404) and a textual
description that will be sent to the client in the form of an
X-WebSocket-Reject-Reason
header.