← Về thư mục
openai4s/share/tunnel.py
- _Req · class · L30-L35 — class _Req
- init · method · L33-L35 — def init(self, credit: int) -> None
- TunnelClient · class · L38-L370 — class TunnelClient
- init · method · L39-L66 — def init( self, relay_url: str, token: str, handler: ShareHandler, *, allow_insecure: bool = False, max_workers: int = p.DEFAULT_MAX_INFLIGHT, ) -> None
- set_shares · method · L69-L80 — def set_shares(self, shares: dict[str, dict[str, Any]]) -> None
- add_share · method · L82-L90 — def add_share(self, share_id: str, meta: dict[str, Any] | None = None) -> None
- remove_share · method · L92-L99 — def remove_share(self, share_id: str) -> None
- ensure_connected · method · L101-L109 — def ensure_connected(self) -> None
- status · method · L111-L119 — def status(self) -> dict[str, Any]
- close · method · L121-L131 — def close(self) -> None
- wait_connected · method · L133-L134 — def wait_connected(self, timeout: float = 5.0) -> bool
- _run · method · L137-L157 — def _run(self) -> None
- _session · method · L159-L197 — def _session(self) -> None
- _read_loop · method · L199-L216 — def _read_loop(self, ws: WSClient) -> None
- _dispatch · method · L218-L228 — def _dispatch(self, msg: dict[str, Any]) -> None
- _serve · method · L231-L269 — def _serve(self, msg: dict[str, Any]) -> None
- _stream_body · method · L271-L285 — def _stream_body(self, req_id: int, req: _Req, body: Any) -> None
- _iter_body · method · L288-L294 — def _iter_body(body: Any) -> Iterator[bytes]
- _split · method · L296-L299 — def _split(self, chunk: bytes) -> Iterator[bytes]
- _register_all · method · L302-L306 — def _register_all(self, desired: dict[str, dict[str, Any]]) -> None
- _cancel · method · L308-L313 — def _cancel(self, req_id: int) -> None
- _grant_credit · method · L315-L322 — def _grant_credit(self, req_id: int, add: int) -> None
- _cancel_all_pending · method · L324-L330 — def _cancel_all_pending(self) -> None
- _safe_send_control · method · L332-L344 — def _safe_send_control(self, obj: dict[str, Any]) -> None
- _safe_send_data · method · L346-L360 — def _safe_send_data( self, req_id: int, chunk: bytes, *, end: bool = False, abort: bool = False ) -> None
- _safe_send_pong · method · L362-L370 — def _safe_send_pong(self, payload: bytes) -> None