Kodi Community Forum
JSON over raw TCP or HTTP - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSON over raw TCP or HTTP (/showthread.php?tid=317161)



JSON over raw TCP or HTTP - BasJaspers - 2017-06-24

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


RE: JSON over raw TCP or HTTP - GreySkies - 2017-06-26

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.