I want to connect the UR to a PC application via TCP/IP sockets, but the interface of the PC application acts as a Client. I wonder if the UR can act as an TCP Server and how can I make the connection?
You could start a socket server listening for a connection from the PC client in a C++/Python daemon which could pass data to Polyscope.
At the moment afaik the UR cannot be setup as a TCP/IP server only as TCP/IP client. If you want to setup a multi client communication between the robot and other machines you will have to make a auxiliary TCP/IP server to handle the communication between the UR and all the other machines.
I would use the Modbus capability and integrate it over open source programs
I was reading how to program a socket server with phyton, and that’s ok, but i didn’t understand how can I pass that code with a daemon to poliscope? do you have more information to read about it?
Easiest way is using the XMLRPC protocol. The link below contains some samples of how to set it up in the simplest form, just between a polyscope URP program and python script. You can then also look at the mydaemon URCap example which shows how to get the data back from the python Daemon in Java.