MCPcopy Index your code
hub / github.com/microsoft/playwright-python / HTTPServer

Class HTTPServer

tests/server.py:286–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285
286class HTTPServer(Server):
287 def __init__(self) -> None:
288 self._listeners: list[Any] = []
289 super().__init__()
290
291 def listen(self, factory: http.HTTPFactory) -> None:
292 self._listeners.append(
293 reactor.listenTCP(self.PORT, factory, interface="127.0.0.1")
294 )
295 try:
296 self._listeners.append(
297 reactor.listenTCP(self.PORT, factory, interface="::1")
298 )
299 except Exception:
300 pass
301
302 def stop(self) -> None:
303 for listener in self._listeners:
304 listener.stopListening()
305 self._listeners.clear()
306
307
308class HTTPSServer(Server):

Callers 3

_show_trace_viewerFunction · 0.90
_show_trace_viewerFunction · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by 2

_show_trace_viewerFunction · 0.72
_show_trace_viewerFunction · 0.72