some other version
This commit is contained in:
@@ -46,10 +46,11 @@ class Networking:
|
||||
self.get("/displays" + display + "/write_score/" + str(score))
|
||||
|
||||
def getInputEvent(self):
|
||||
header = ''
|
||||
while chr(2) not in header:
|
||||
header += str(self.input_socket.recv(1))
|
||||
header = bytearray()
|
||||
while b'\x02' not in header:
|
||||
bla = self.input_socket.recv(1)
|
||||
header.append(bla)
|
||||
|
||||
length = int(header[:-1])
|
||||
length = int(str(header[:-1]))
|
||||
|
||||
return self.input_socket.recv(length)
|
||||
|
||||
Reference in New Issue
Block a user