class_docstr: A very basic web server.
class_docstr_tok: ["A","very","basic","web","server","."]
code: def __init__(
      self, host: str = DEFAULT_HOST, port: int = DEFAULT_PORT
  ) -> None:
      self.stop_serving = False
      while True:
          try:
              self.server = HTTPServer((host, port), HtmlOnlyHandler)
              self.host = host
              self.port = port
              break
          except OSError:
              log.debug(f"port {port} is in use, trying to next one")
              port += 1
  
      self.thread = threading.Thread(target=self._run_web_server)
  
file_path: bokeh/tests/support/plugins/file_server.py
imports: from __future__ import annotations
  import logging
  import os
  import threading
  from http.server import BaseHTTPRequestHandler, HTTPServer
  from pathlib import Path
  from typing import Any
  from urllib.request import urlopen
  import pytest
label_desc: Use image node_id 1 to create a new SimpleWebServer object  with example: obj = SimpleWebServer(host, port)