Your documentation states that Websocket is the only form of socket to be used in UXP, and yet this example uses io.socket which was used in CEP. In addition, when I try to import io.socket on my own project, it fails, further establishing the fact that it isn't an included standard module the way that 'photoshop' is.
https://github.com/AdobeDocs/uxp-photoshop-plugin-samples/tree/main/desktop-helper-sample
As such, both of the websocket examples you have available are non-functional, and neither one uses the new manifest.json permissions requirements for network communication, so I have three dissenting opinions from the official source on how to actually connect to either a local host or the internet.
Please fix this.