Dear All,
I´ve had such headaches with the jetty implementation of websockets. I´ve been told that for most people it works well, but I have one particular website that works well in chrome, but sometimes - there can be weeks inbetween - decides to not let me upgrade the connection. My guess is that this is some low level stuff going on in the headers of the handshake request, which is impossible to fiddle with in the jetty implementation. The site in question probably falls back to an older implementation of websockets that doesn´t cause chrome any issues. I´ve opened numerous threads about the subject on this forum, but there´s really no workaround for it.
So I decided to take a different approach: I´ll be calling the website from a html document containing javascript in a webview, and let it output the sockets that I´ll then be capturing from within b4j using for instance something like
.
The thing is, I need them to come continously into b4j but I´m only aware of one-off methods to capture the data. I know I can do this with a timer, but I find this inconvenient for the scenario in question.
I hope I was clear enough. Any ideas?
I´ve had such headaches with the jetty implementation of websockets. I´ve been told that for most people it works well, but I have one particular website that works well in chrome, but sometimes - there can be weeks inbetween - decides to not let me upgrade the connection. My guess is that this is some low level stuff going on in the headers of the handshake request, which is impossible to fiddle with in the jetty implementation. The site in question probably falls back to an older implementation of websockets that doesn´t cause chrome any issues. I´ve opened numerous threads about the subject on this forum, but there´s really no workaround for it.
So I decided to take a different approach: I´ll be calling the website from a html document containing javascript in a webview, and let it output the sockets that I´ll then be capturing from within b4j using for instance something like
B4X:
content = (joWV.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array("document.getElementsByTagName('html')[0].innerText")))
The thing is, I need them to come continously into b4j but I´m only aware of one-off methods to capture the data. I know I can do this with a timer, but I find this inconvenient for the scenario in question.
I hope I was clear enough. Any ideas?