constructor new Client
new Client(url[, options])
-
url
(String
) – The WebSocket URL to the server to connect to. This should use thews
protocol, port 80 by default. Ex:ws://mygame.com:8080
-
options
(Object
) – The optionaloptions
object's properties are copied to theClient
instance. Allows all the same values as found in Client.DEFAULTS.
Instantiates a new Client
, using the options found in the
options
parameter to configure. Clients do not make a socket connection
during construction (unlike the WebSocket API in HTML 5). To connect to
the server, the Client#connect
method must be called first.