Communication scheme
INScore forwarding mechanism supports http and ws protocols since version 1.27. Since these protocols are connection based, a counterpart connect message is provided with the Web version.
connectMsg
- 1) removes the existing set of connections,
- 2) connect to a list of remote hosts. Once the connection is established, the local INScore engine may receive messages from the remote hosts. To establish the connection, the remote hosts must have set a forwarding mechanism using the same protocol with the same port number.
remoteHost
- 1) uses http as communication protocol,
- 2) uses https,
- 3) uses websockets.
Web messages format
Messages emitted by the http and ws forwarding mechanism and received by connected clients are encoded in JSON and transmitted as base64 encoded packets. The JSON format is the following:
{
'id' : number ,
'method' : 'post' ,
'data' : textual inscore messages
}
- id: is a packet unique identifier (currently unused)
- method: value must be 'post'
- data: must contain a valid inscore script
Although the native version of INScore supports this format for the http, https and ws protocols, nothing prohibits another application to control INScore web pages, provided that the format described above is respected.