Sorry for my previous post, I did hit the wrong button.
I did do a little mockup, input.4gl is the program where the input should happen,srv.4gl is the http/socket server,sendcode.4gl is the mockup for sending the code via WiFi.
srv.4gl is started from input.4gl and spawns a combination of http server and socket server.
The webcomponent starts a connection to the http server and gets the result as soon as data is sent to the socket server.
The webcomponent is then able to push the data into the current dialog.
git clone https://github.com/leopatras/wc_sse.git
cd wc_sse
make run
In another terminal
If there are questions to this sample let me know.
The disadvantage of this solution is:
- you need a webcomponent
- you need to have access to your server side from the client
In the future a new
trigger would be very useful to be able to get also input from a socket channel at the same time an INPUT is active.
This would avoid the need for a webcomponent and limit the communication to the server side only.
It requires however changes in the GAS protocol and the GBC.
HTH and Regards, Leo