You can configure a secure connection, using URL property or Host / Port properties, see Connect to WebSocket Server.
In TLSOptions property there are the properties to customize a secure connection. The most important property is version, which specifies the version of TLS protocol. Usually setting TLS property to true and TLSOptions.Version to tlsUndefined is enough for the wide majority of WebSocket Servers.
TLSOptions.Version allows to set the TLS version used to connect to server or let the client negotiate the TLS version from all available (this is the default when value is tlsUndefined).
If you get an error trying to connect to a server about TLS protocol, most probably this server requires a TLS version newer than you set.
If TLSOptions.IOHandler is set to iohOpenSSL, you need to deploy OpenSSL libraries (which are the libraries that handle all TLS stuff), check the following article about OpenSSL.
If TLSOptions.IOHandler is set to iohSChannel, then there is no need to deploy any library (only windows is supported).