Release 2024.12.23
[yt-dlp.git] / yt_dlp / networking / websocket.py
blob0e7e73c9e22a7457b3f12b53c14040f46c786925
1 from __future__ import annotations
3 import abc
5 from .common import RequestHandler, Response
8 class WebSocketResponse(Response):
10 def send(self, message: bytes | str):
11 """
12 Send a message to the server.
14 @param message: The message to send. A string (str) is sent as a text frame, bytes is sent as a binary frame.
15 """
16 raise NotImplementedError
18 def recv(self):
19 raise NotImplementedError
22 class WebSocketRequestHandler(RequestHandler, abc.ABC):
23 pass