Thread Rating:
  • 0 Vote(s) - 0 Average
JSON over raw TCP or HTTP
At the moment I am using a raw TCP socked to communicate trough JSON to control Kodi.
I am noticing that at some point to RAW socket get's broken and I can't communicate any more, even when I close the socked and open it again I can't get it up and running.
But when using HTTP command's to control Kodi I can still control it.

So the question is: Is there a difference between war TCP control and HTTP control? So would it be worth it to rewrite my code to HTTP control?

I am using Kodi 17.2
I've never used JSON over TCP, so I may be off-base, but could your socket be timing out? When I open a socket, I send my command, get my response, then close the socket, every time.

JSON over raw TCP or HTTP00