]> jfr.im git - yt-dlp.git/blame - yt_dlp/networking/websocket.py
[ie/youtube] Suppress "Unavailable videos are hidden" warning (#10159)
[yt-dlp.git] / yt_dlp / networking / websocket.py
CommitLineData
ccfd70f4 1from __future__ import annotations
2
3import abc
4
f9fb3ce8 5from .common import RequestHandler, Response
ccfd70f4 6
7
8class WebSocketResponse(Response):
9
10 def send(self, message: bytes | str):
11 """
12 Send a message to the server.
13
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
17
18 def recv(self):
19 raise NotImplementedError
20
21
22class WebSocketRequestHandler(RequestHandler, abc.ABC):
23 pass