Commit 29344033 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

print received messages on stdout

parent 209c3adb
...@@ -31,6 +31,8 @@ for ifidx, ifname in socket.if_nameindex(): ...@@ -31,6 +31,8 @@ for ifidx, ifname in socket.if_nameindex():
try: try:
while True: while True:
data, address = sock.recvfrom(10240) data, address = sock.recvfrom(10240)
logging.info('%s received %s', hostname, data.decode("utf-8")) msg = data.decode("utf-8")
print(msg)
logging.info('%s received %s', hostname, msg)
finally: finally:
sock.close() sock.close()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment