MCPcopy Index your code
hub / github.com/adafruit/Adafruit_CircuitPython_HTTPServer / start

Method start

adafruit_httpserver/server.py:291–307  ·  view source on GitHub ↗

Start the HTTP server at the given host and port. Requires calling ``.poll()`` in a while loop to handle incoming requests. :param str host: host name or IP address :param int port: port

(self, host: str = "0.0.0.0", port: int = 5000)

Source from the content-addressed store, hash-verified

289 return sock
290
291 def start(self, host: str = "0.0.0.0", port: int = 5000) -> None:
292 """
293 Start the HTTP server at the given host and port. Requires calling
294 ``.poll()`` in a while loop to handle incoming requests.
295
296 :param str host: host name or IP address
297 :param int port: port
298 """
299 self._verify_can_start(host, port)
300
301 self.host, self.port = host, port
302
303 self.stopped = False
304 self._sock = self._create_server_socket(self._socket_source, self._ssl_context, host, port)
305
306 if self.debug:
307 _debug_started_server(self)
308
309 def stop(self) -> None:
310 """

Calls 3

_verify_can_startMethod · 0.95
_create_server_socketMethod · 0.95
_debug_started_serverFunction · 0.85

Tested by

no test coverage detected