Following the tutorials of AsyncStreams I have a B4J Server running. I need to implement a websocket client which will send and receive some forms information. The client application right now is implemented mostly with JS/JQuery/PHP. Also there is an B4A app which will be sync with the web client. So... The problem is the web app.
My question is about the Prefix mode and the protocol that should be used. I'm not sure how to implement in a way that both sides can communicate.
I'm considering to use this package https://github.com/jbloemendal/jquery-simple-websocket
I can provide a protocol, for example
Right now I can't figure how to proceed.. I could use any other package or pure JS etc.
Any ideas on the implementation of the "prefix" protocol (client) would be great! Thanks!
My question is about the Prefix mode and the protocol that should be used. I'm not sure how to implement in a way that both sides can communicate.
I'm considering to use this package https://github.com/jbloemendal/jquery-simple-websocket
I can provide a protocol, for example
B4X:
var socket = $.simpleWebSocket(
{
url: 'ws://127.0.0.1:3000/',
protocols: 'your_protocol', // optional
Right now I can't figure how to proceed.. I could use any other package or pure JS etc.
Any ideas on the implementation of the "prefix" protocol (client) would be great! Thanks!