Skip to content
Snippets Groups Projects
Commit fedf28a9 authored by daniel's avatar daniel
Browse files

python/client: Make recv() in the blit function optional

This was long calculations can be done while the client is waiting for
the response packet (which is empty anyway).
parent c9ec20f2
No related branches found
No related tags found
No related merge requests found
......@@ -55,11 +55,15 @@ def set_pixels(pixels):
socket.send_multipart(msg + [b''])
rx = socket.recv()
def blit(x, y, w, h, pixels):
def blit(x, y, w, h, pixels, rec=True):
x += WOFFSET
assert w*h == len(pixels)
msg = struct.pack('<Biiii', 1, x, y, w, h)+b''.join(map(chr, pixels))
socket.send_multipart([msg, b''])
if rec:
rx = socket.recv()
def rec():
rx = socket.recv()
################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment