use wss if protocol is https, ws if http