mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 00:25:15 +00:00 
			
		
		
		
	Authored by: bashonly, pukkandan, seproDev, Grub4K Co-authored-by: bashonly <bashonly@protonmail.com> Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com> Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			510 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			510 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from __future__ import annotations
 | 
						|
 | 
						|
import abc
 | 
						|
 | 
						|
from .common import RequestHandler, Response
 | 
						|
 | 
						|
 | 
						|
class WebSocketResponse(Response):
 | 
						|
 | 
						|
    def send(self, message: bytes | str):
 | 
						|
        """
 | 
						|
        Send a message to the server.
 | 
						|
 | 
						|
        @param message: The message to send. A string (str) is sent as a text frame, bytes is sent as a binary frame.
 | 
						|
        """
 | 
						|
        raise NotImplementedError
 | 
						|
 | 
						|
    def recv(self):
 | 
						|
        raise NotImplementedError
 | 
						|
 | 
						|
 | 
						|
class WebSocketRequestHandler(RequestHandler, abc.ABC):
 | 
						|
    pass
 |