Re: Google Charts using Web Socket data from Server every 5 seconds - Video
Charles... it doesn't matter what UX you're currently viewing... it's the web-socket server that's handling the broadcast. This is what you have to wrap your head around. The UX (the Client) automatically receives broadcasted messages from the web-socket server. Read the info in the release notes a few times and you'll start to understand what's happening. Also, read the inline notes in the Action Javascript choices for Web-Sockets.
The web-socket server is like the main post office. You send it a message and it broadcasts that message to all components that say... "sure... I'll receive messages... go ahead". If 10 UXs are currently running, then all 10 get the message. If 1000 users are viewing the same UX... 1000 users will get that message.
You can send a message from the client (the UX) to the websocket server... or you can send a message from the Alpha Server (XBasic) to the websocket server.
Sending a message client-side is like sending an email to a group... everyone gets the message except you.
Sending a message server-side... everyone, including you, gets the message.
http://youtu.be/19xQJAO35-4?hd=1
The attached zip contains 2 UX components. One contains a List control... the other does not. I'm controlling the List from the UX which does not have the List.
As well, I'm sending a client-side message to update the Users Gauge. In this case, the sending UX does not receive the message. So... client-side... I have to also perform whatever the message is.
Charles... it doesn't matter what UX you're currently viewing... it's the web-socket server that's handling the broadcast. This is what you have to wrap your head around. The UX (the Client) automatically receives broadcasted messages from the web-socket server. Read the info in the release notes a few times and you'll start to understand what's happening. Also, read the inline notes in the Action Javascript choices for Web-Sockets.
Once the 'Web-socket server' property has been checked, when the UX or Grid component is run, it will automatically launch the web-socket server (if it is not already running) and it will start listening for messages. When a message is received, the client-side webSocketOnMessage event will fire and your Javascript code can decide what (if anything) to do with the message.
You can send a message from the client (the UX) to the websocket server... or you can send a message from the Alpha Server (XBasic) to the websocket server.
Sending a message client-side is like sending an email to a group... everyone gets the message except you.
Sending a message server-side... everyone, including you, gets the message.
http://youtu.be/19xQJAO35-4?hd=1
The attached zip contains 2 UX components. One contains a List control... the other does not. I'm controlling the List from the UX which does not have the List.
As well, I'm sending a client-side message to update the Users Gauge. In this case, the sending UX does not receive the message. So... client-side... I have to also perform whatever the message is.
Comment