even though I love python and use asyncio all the time, I think ]socat and tcpdump achieve the same means, instead of having a program dump str(binary_data) to log, as this program does, I would use the great collection of pcap tools like wireshark and others to view the data in a much more structured way .. also, it can be replayed! (tcpplay)