Maximum allowed message size. If the remote peer sends a message larger than this, the connection will be closed. Default is 10MiB.
(self)
| 297 | |
| 298 | @property |
| 299 | def max_message_size(self) -> int: |
| 300 | """Maximum allowed message size. |
| 301 | |
| 302 | If the remote peer sends a message larger than this, the connection |
| 303 | will be closed. |
| 304 | |
| 305 | Default is 10MiB. |
| 306 | """ |
| 307 | return self.settings.get( |
| 308 | "websocket_max_message_size", _default_max_message_size |
| 309 | ) |
| 310 | |
| 311 | def write_message( |
| 312 | self, message: Union[bytes, str, Dict[str, Any]], binary: bool = False |