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