Make parsing/serializing in socket protocol work

This commit is contained in:
Henryk Plötz 2019-06-29 11:34:11 +02:00
parent 77f1762ece
commit 660a404bc9

View file

@ -103,7 +103,7 @@ class SocketTransport(Transport):
def send(self, apdu, tries: int=0, no_wait: bool=False):
"""Send data."""
to_send = bytes(apdu.to_list())
to_send = apdu.serialize()
self.slog(data=bs2hl(binstring=to_send), incoming=False)
total_sent = 0
msglen = len(to_send)
@ -170,7 +170,7 @@ class SocketTransport(Transport):
self.sock.settimeout(timeout)
data = self._receive()
self.slog(data=bs2hl(binstring=data), incoming=True)
return True, Packet.parse(blob=data)
return True, Packet.parse(data)
def close(self):
"""Shutdown and close the connection."""