Hi, I'm currently working on a protocol that uses multiple WebSocket connections, each is used to receive unrelated incoming data.
Since the user only needs the data received on some of the WebSockets, we need to provide a way for the user to enable/disable the WebSocket connection.
Right now I'm using dynamic IP parameters for each connection and when I wish to disable a connection, I set the respective dynamic IP to empty. But this approach causes regular timeouts on the element.
What would then be the best approach to enable/disable WebSocket connections?
Thanks in advance.
Hi Pedro,
Would a condition based on a toggle button (enabled/disabled) be a valid workaround? That way the response would be parsed (or not) based on that condition.
Kind regards,
Hi Flávio,
Thanks for the suggestion. That would be a valid workaround if we wish to avoid processing the response after receiving the incoming message.
However, in our case, we don’t want to even receive unwanted incoming messages, as we receive a lot of them and it directly impacts SLPort.
Kind Regards,