Files
baijiahao_data_crawl/venv/Lib/site-packages/mitmproxy_rs/udp.pyi
“shengyudong” 322ac74336 2025-12-25 upload
2025-12-25 11:16:59 +08:00

31 lines
672 B
Python

from __future__ import annotations
from collections.abc import Awaitable, Callable
from typing import final
from . import Stream
async def start_udp_server(
host: str,
port: int,
handle_udp_stream: Callable[[Stream], Awaitable[None]],
) -> UdpServer: ...
@final
class UdpServer:
def getsockname(self) -> tuple[str, int]: ...
def close(self) -> None: ...
async def wait_closed(self) -> None: ...
def __repr__(self) -> str: ...
async def open_udp_connection(
host: str,
port: int,
*,
local_addr: tuple[str, int] | None = None,
) -> Stream: ...
__all__ = [
"start_udp_server",
"UdpServer",
"open_udp_connection",
]