Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Sunday June 20, 2021 at 13:38
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Depends on what the server supports. If this is a JSONRPC api then the transport is likely HTTP-based. This being said, if you use the HTTP 1.1 protocol and don't specify a close connection header

Connection: close

Then the server may choose to keep the socket open. In certain cases, you can pipeline (send multiple) requests over the same socket waiting for a response after each request but your code has to process the Content Length response header such that it knows how to break apart each message.

There are other protocols such as the CometD/Bayeaux protocol that SqueezeCenter uses which support registering for 'events' on the server and when something changes, the server will send an event across the socket. CometD sends 'chunked' responses. I had to modify the Philips HTTP Library to support handling these types of responses so I know it works.

I have never used Kodi so don't know if it support asynchronous events or the protocol that it uses.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse