I have two website applications under the same Web page. Both uses the same Default.json file, with enableWebSocket true. Both websites needs to be refreshed frequently. For one website Application.IsWebsocket returns true, while on the website it returns false. The one not working got installed later. I am opening those websites from the server (localhost), same browser. I can’t figure out the problem alone, please help me!
If you run code in a thread you must call Application.Update(). Browsers only receive a response if there is a request. WebSocket allows for a push update, which requires a push.
If Application.Update() works then it’s using WebSocket.
If you check Application.IsWebSocket in Program.Main it will always be false since the first request is always http.
So here is my setup:
Dim x As Integer = 2
Do While ElaspedSeconds< ChangeSeconds
ProgressCircle1.Value = Math.Floor((ElaspedSeconds/ ChangeSeconds) * 100)
LabelTime.Text = Now.ToLongDateString & ” ” & Now.ToLongTimeString
If x<> ShownPanelList.Count – 1 Then
Edit 1#: This sub is inside a Thread.
Edit 2#: Adding Application.Update(Me) after setting the Invoke which sets the time seems to solve this issue, but still it’s not running in websocket mode.
Please login first to submit.