Maximum allowed message size. If the remote peer sends a message larger than this, the connection will be closed. Default is 10MiB.
(self)
| 321 | |
| 322 | @property |
| 323 | def max_message_size(self) -> int: |
| 324 | """Maximum allowed message size. |
| 325 | |
| 326 | If the remote peer sends a message larger than this, the connection |
| 327 | will be closed. |
| 328 | |
| 329 | Default is 10MiB. |
| 330 | """ |
| 331 | return self.settings.get( |
| 332 | "websocket_max_message_size", _default_max_message_size |
| 333 | ) |
| 334 | |
| 335 | def write_message( |
| 336 | self, message: Union[bytes, str, Dict[str, Any]], binary: bool = False |