maintain a realtime connection between VC and a webbrowser

I would like to maintain a realtime 2way connection between VC and a webbrowser. The idea is to make an animation on pressing a button in the webbrowser and VC sends back the value of the animation back to the web browser, say the position of a robot between two points A and B. whats the easiest way to achieve this functionality?

Any help is appreciated, thanks

I think someone posted a TCP/UDP example already or might have a working example that does not use Python socket api. Maybe they can share it.

Where can I find TCP / UDP examples? I haven’t seen anyone discuss them in the forum

Interesting. If you search “TCP/IP”, “UDP”, you might find something. Here is example.

I think there is also a snippet in the Python editor in VC to quickly insert code for the connection.

Note that web browsers don’t allow normal socket connections. You would need to use web sockets instead.