@abc.abstractmethod
def write_message(
- self, message: Union[str, bytes], binary: bool = False
+ self, message: Union[str, bytes, Dict[str, Any]], binary: bool = False
) -> "Future[None]":
raise NotImplementedError()
return self.stream.write(frame)
def write_message(
- self, message: Union[str, bytes, Dict[str, any]], binary: bool = False
+ self, message: Union[str, bytes, Dict[str, Any]], binary: bool = False
) -> "Future[None]":
"""Sends the given message to the client of this Web Socket."""
if binary:
future_set_result_unless_cancelled(self.connect_future, self)
def write_message(
- self, message: Union[str, bytes, Dict[str, any]], binary: bool = False
+ self, message: Union[str, bytes, Dict[str, Any]], binary: bool = False
) -> "Future[None]":
"""Sends a message to the WebSocket server.