Sending a Dictionary using Sockets in Python?

前端 未结 6 565
悲哀的现实
悲哀的现实 2021-01-12 06:27

My problem: Ok, I made a little chat program thing where I am basically using sockets in order to send messages over a network.

It works great, but when I decided t

6条回答
  •  太阳男子
    2021-01-12 06:39

    Using JSON to serialize your data is the way I prefer to do it. I actually made a library that does just that for you: jsonsocket library. It will do the serialization/deserialization automatically for you. It also handles big amounts of data efficiently.

提交回复
热议问题