constructor(url, protocol) {
    this.url = url;
    this.protocol = protocol;
    /** @suppress {visibility} suppression added to enable type checking */
    this.readyState = NetWebSocket.ReadyState_.CONNECTING;
  }
@param {string} url The url to the web socket server.
@param {string} protocol The protocol to use.