Thursday, 11 April 2024
  4 Replies
  102 Visits
  Subscribe
Looking for best practices for using a IWWebsocket client in an Intraweb application that has either two web pages or one page and a tabbed selection of two sets of controls. I have a Delphi 12 application that I want to build a remote control web application using sgcWebsockets. Let's say the main exe has two parts to it and the buttons to control them are different. My IntraWeb app wants to have the buttons to control one part on a screen and the buttons to control the other part on a different screen.
If I put a WebSocketServer in my main exe and a IWWebsocketClient in my web app, they can start up fine and talk to each other and all is well. However, if I change the tab on the web app to show the second set of controls, communications stop. There is no trigger of either OnAsyncDisconnect event, client or server. Going back to the original tab now doesn't work either.

What is the correct design to enable multipage communications? If there is an example, I'm sorry I missed it.
Thank you.