Currently, the messages that the clients and the server are sending each other is just a mess.
They're pretty much just string dumps of whatever textual information I can add to describe what the message should do.
I pretty much have on_message methods regexing to find certain words for key commands...
Hence I had a big TODO that reminded me that I have to give structure to these messages, and JSON seems like the best fit for that.
Since the ETA of the servo is set on Monday, I should get this "house cleaning" done for now.
Since the ETA of the servo is set on Monday, I should get this "house cleaning" done for now.
Didn't have much time after I got home today, so I just started reading on JSON for Python.
Nothing complicated: json.dumps and json.loads. Done?
As expected, the hard (well, not hard, but requires effor?) part will be organizing the current message structure and not implementation.
Comments
Post a Comment