logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

websocket.py (510B)


  1. from __future__ import annotations
  2. import abc
  3. from .common import RequestHandler, Response
  4. class WebSocketResponse(Response):
  5. def send(self, message: bytes | str):
  6. """
  7. Send a message to the server.
  8. @param message: The message to send. A string (str) is sent as a text frame, bytes is sent as a binary frame.
  9. """
  10. raise NotImplementedError
  11. def recv(self):
  12. raise NotImplementedError
  13. class WebSocketRequestHandler(RequestHandler, abc.ABC):
  14. pass