I am trying to write a B4J app which consumes a livestream of data from a sports game. On connection initial data is sent and then as on-field actions occur further data is sent. Data is in JSON format. The API requires a long running connection. It is not to be treated as a RESTful call, with multiple calls to download the data not required and indeed forbidden.
The livestream can be accessed via https:// . . . . . /read/ID?ak=API_Key. Indeed I can see the initial data in a browser (Chrome) and subsequent action initiated data appears at the bottom.
I have previously written an app which consumed similar data by establishing a TCP socket connection with the data server on the local network and consuming the TCPSocket.InputStream with AsyncStreamsText. But now I'm struggling to work out how in B4J to create a data stream from a HTTP call to the specified URL.
Any suggestions on what framework I should use would be appreciated.
The livestream can be accessed via https:// . . . . . /read/ID?ak=API_Key. Indeed I can see the initial data in a browser (Chrome) and subsequent action initiated data appears at the bottom.
I have previously written an app which consumed similar data by establishing a TCP socket connection with the data server on the local network and consuming the TCPSocket.InputStream with AsyncStreamsText. But now I'm struggling to work out how in B4J to create a data stream from a HTTP call to the specified URL.
Any suggestions on what framework I should use would be appreciated.