1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
import socketserver
from collections.abc import Callable
from io import BytesIO
from typing import Any
from wsgiref import simple_server
from django.core.handlers.wsgi import WSGIHandler, WSGIRequest
def get_internal_wsgi_application() -> WSGIHandler: ...
def is_broken_pipe_error() -> bool: ...
class WSGIServer(simple_server.WSGIServer):
request_queue_size: int
address_family: Any
allow_reuse_address: Any
def __init__(self, *args: Any, ipv6: bool = ..., allow_reuse_address: bool = ..., **kwargs: Any) -> None: ...
def handle_error(self, request: Any, client_address: Any) -> None: ...
class ThreadedWSGIServer(socketserver.ThreadingMixIn, WSGIServer): ...
class ServerHandler(simple_server.ServerHandler):
def handle_error(self) -> None: ...
class WSGIRequestHandler(simple_server.WSGIRequestHandler):
close_connection: bool
connection: WSGIRequest
request: WSGIRequest
rfile: BytesIO
wfile: BytesIO
protocol_version: str
def address_string(self) -> str: ...
def log_message(self, format: str, *args: Any) -> None: ...
def get_environ(self) -> dict[str, str]: ...
raw_requestline: bytes
requestline: str
request_version: str
def handle(self) -> None: ...
def run(
addr: str | bytes | bytearray,
port: int,
wsgi_handler: WSGIHandler,
ipv6: bool = ...,
threading: bool = ...,
on_bind: Callable[[str], None] | None = ...,
server_cls: type[WSGIServer] = ...,
) -> None: ...
__all__ = ("WSGIRequestHandler", "WSGIServer")
|