code: public WebSocket createSocket(String uri, int timeout) throws IOException
      {
          if (uri == null)
          {
              throw new IllegalArgumentException("The given URI is null.");
          }
  
          if (timeout < 0)
          {
              throw new IllegalArgumentException("The given timeout value is negative.");
          }
  
          return createSocket(URI.create(uri), timeout);
      }
docs: Create a WebSocket.
  
  <p>
  This method is an alias of {@link #createSocket(URI, int) createSocket}{@code
  (}{@link URI#create(String) URI.create}{@code (uri), timeout)}.
  </p>
  
  @param uri
  The URI of the WebSocket endpoint on the server side.
  
  @param timeout
  The timeout value in milliseconds for socket connection.
  A timeout of zero is interpreted as an infinite timeout.
  
  @return
  A WebSocket.
  
  @throws IllegalArgumentException
  The given URI is {@code null} or violates RFC 2396, or
  the given timeout value is negative.
  
  @throws IOException
  Failed to create a socket. Or, HTTP proxy handshake or SSL
  handshake failed.
  
  @since 1.10