From 88a8888859309c84387ebfc32981651c36881729 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 14 Jul 2021 14:41:22 +0800 Subject: [PATCH] bugfix --- kivyblocks/udp_widget.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kivyblocks/udp_widget.py b/kivyblocks/udp_widget.py index 1a59e36..f1ee658 100644 --- a/kivyblocks/udp_widget.py +++ b/kivyblocks/udp_widget.py @@ -67,6 +67,7 @@ class UdpWidget(EventDispatcher): raise Exception('timeout') def comm_callback(self, data, addr): + print('received:', data, 'addr=', addr) d = None if data[:18] == b'0x00' * 18: data = data[18:] @@ -82,6 +83,7 @@ class UdpWidget(EventDispatcher): return if not isinstance(d, dict): return + print('received: data=', d) cmd = d['c'] f = self.inner_handler(cmd) if f: @@ -121,6 +123,7 @@ class UdpWidget(EventDispatcher): def send(self, peer_id, data): d = self.dataencoder.pack(peer_id, data) addr = (peer_id, self.udp_port) + print('send():', peer_id, data) self.udp_transport.send(d, addr) def stop(self):