← Về thư mục
openai4s/server/ws_frames.py
- ws_accept · function · L33-L34 — def ws_accept(key: str) -> str
- ws_client_key · function · L37-L40 — def ws_client_key() -> str
- frame_header_size · function · L43-L50 — def frame_header_size(payload_len: int) -> int
- _mask · function · L53-L61 — def _mask(payload: bytes, mask: bytes) -> bytes
- ws_encode · function · L64-L89 — def ws_encode( payload: bytes, opcode: int = 0x1, *, mask: bool = False, fin: bool = True, ) -> bytes
- _read_exact · function · L92-L103 — def _read_exact(stream, n: int) -> bytes | None
- ws_read_frame · function · L106-L181 — def ws_read_frame( stream, *, expect_mask: bool | None = None, max_len: int = DEFAULT_MAX_FRAME, ) -> tuple[int, bytes] | None