diff options
author | Devaev Maxim <[email protected]> | 2021-01-23 07:35:34 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-01-23 08:11:38 +0300 |
commit | 61f52a36a27b68306fad04224f1964be9ea1d032 (patch) | |
tree | 85151e5afc1eb6a8b03b9babb31630a0c3bd502d /kvmd/apps/vnc/rfb | |
parent | 4d4fb69d2eb2e9b3d677b82098d888bd899c8c33 (diff) |
rename
Diffstat (limited to 'kvmd/apps/vnc/rfb')
-rw-r--r-- | kvmd/apps/vnc/rfb/__init__.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kvmd/apps/vnc/rfb/__init__.py b/kvmd/apps/vnc/rfb/__init__.py index ce2b0daf..f0a42223 100644 --- a/kvmd/apps/vnc/rfb/__init__.py +++ b/kvmd/apps/vnc/rfb/__init__.py @@ -151,18 +151,18 @@ class RfbClient(RfbClientStream): # pylint: disable=too-many-instance-attribute # ===== - async def _send_fb_jpeg(self, jpeg: bytes) -> None: + async def _send_fb_jpeg(self, data: bytes) -> None: assert self._encodings.has_tight assert self._encodings.tight_jpeg_quality > 0 - assert len(jpeg) <= 4194303, len(jpeg) + assert len(data) <= 4194303, len(data) await self._write_fb_update(self._width, self._height, RfbEncodings.TIGHT, drain=False) - length = len(jpeg) + length = len(data) if length <= 127: - await self._write_struct("", bytes([0b10011111, length & 0x7F]), jpeg) + await self._write_struct("", bytes([0b10011111, length & 0x7F]), data) elif length <= 16383: - await self._write_struct("", bytes([0b10011111, length & 0x7F | 0x80, length >> 7 & 0x7F]), jpeg) + await self._write_struct("", bytes([0b10011111, length & 0x7F | 0x80, length >> 7 & 0x7F]), data) else: - await self._write_struct("", bytes([0b10011111, length & 0x7F | 0x80, length >> 7 & 0x7F | 0x80, length >> 14 & 0xFF]), jpeg) + await self._write_struct("", bytes([0b10011111, length & 0x7F | 0x80, length >> 7 & 0x7F | 0x80, length >> 14 & 0xFF]), data) async def _send_resize(self, width: int, height: int) -> None: assert self._encodings.has_resize |